From 031d805bb24b1e8bdbfcfb2aa46b2ebe41e0161d Mon Sep 17 00:00:00 2001 From: Geert Janssens Date: Wed, 22 Jan 2020 22:05:20 +0100 Subject: [PATCH] Fix binreloc test for all install paths inside prefix The FHS standard rules for a /opt based prefix sets a sysconfig dir to /etc/opt/... which is outside of /opt. This was however not detected properly. It now is. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a1e58c77d2..110315aef1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,7 +74,7 @@ foreach(install_dir ${CMAKE_INSTALL_FULL_BINDIR} ${CMAKE_INSTALL_FULL_SYSCONFDIR} ${CMAKE_INSTALL_FULL_DATAROOTDIR} ${CMAKE_INSTALL_FULL_DATADIR} ${CMAKE_INSTALL_FULL_LIBDIR}) string(FIND ${install_dir} ${CMAKE_INSTALL_PREFIX} in_prefix) - if(in_prefix EQUAL -1) + if(NOT (in_prefix EQUAL 0)) set(ENABLE_BINRELOC OFF) message(WARNING "${install_dir} is set outside of the intallation prefix ${CMAKE_INSTALL_PREFIX}. That will break relocation so ENABLE_BINRELOC is set to off. With relocation disabled GnuCash will run only in its configured install location. You must set GNC_UNINSTALLED=1 and GNC_BUILDDIR=/path/to/builddir to run from the build directory. GnuCash will not run from a DESTDIR.") break()