summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann E. MORIN <yann.morin.1998@free.fr>2017-03-04 14:16:58 +0100
committerJosé Fonseca <jose.r.fonseca@gmail.com>2017-03-21 11:33:45 +0000
commitafa31e581c4ce2deeddfba257de7ad1a3cd09331 (patch)
treec270cd59b338f25f6efeb7afc62c69d4a3c933ec
parent03b0ed0296e3ac9e36bd70d2ab1a3f5bad7602e8 (diff)
CMakeList: do not overwrite module path
Currently, the CMakeList.txt completely overwrites the CMAKE_MODULE_PATH variable. This is problematic when an upper-layer buildsystem wants to set its own module path to use custom modules. For example, Buldroot [0] provides a custom platform description [1] to fix cross-compilation issue. Overwriting the module path means that this custom platform description is not found: System is unknown to cmake, create: Platform/Buildroot to use this system, please send your config file to cmake@www.cmake.org so it can be added to cmake Providing such a custom platform description is what the upstream cmake devs suggest [2], quoting: If a toolchain file specifies CMAKE_SYSTEM_NAME such that a custom `Platform/MySystem.cmake` file is loaded then the latter can set them [*] as needed for the target platform. [*] offending settings causing RPATH issues during cross-compilation. So we need to append to the module path, rather than replace it blindly. [0] https://buildroot.org/ [1] https://git.buildroot.org/buildroot/tree/support/misc/Buildroot.cmake [2] http://public.kitware.com/pipermail/cmake/2017-February/065063.html Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
-rw-r--r--CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5db7bf03..29cf59f4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -84,7 +84,7 @@ if (NOT WIN32)
endif ()
endif ()
-set (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
+list (APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
include (ConvenienceLibrary)
include (InstallPDB)