From 5cbb101b2dd6b7e160b8f35f50f64d2a7bd75d15 Mon Sep 17 00:00:00 2001 From: Adam Szmigin Date: Tue, 13 Apr 2021 23:30:32 +0100 Subject: [PATCH] CMake fix passing multiple paths to libdjinterop --- CMakeLists.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c368e69665c..b5b0821cb64 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1722,6 +1722,11 @@ if(ENGINEPRIME) set(DJINTEROP_INSTALL_DIR "${CMAKE_CURRENT_BINARY_DIR}/lib/libdjinterop-install") set(DJINTEROP_LIBRARY "lib/${CMAKE_STATIC_LIBRARY_PREFIX}djinterop${CMAKE_STATIC_LIBRARY_SUFFIX}") file(MAKE_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/download") + + # CMake does not pass lists of paths properly to external projects. + # This is worked around by changing the list separator. + string(REPLACE ";" "|" PIPE_DELIMITED_CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH}") + # External project sources must be downloaded as an archive into DOWNLOAD_DIR # from an URL to keep offline builds like for Fedora/RPM Fusion working! ExternalProject_Add(libdjinterop @@ -1729,12 +1734,13 @@ if(ENGINEPRIME) URL_HASH SHA256=87b3e6c726c208333d55b7e7e3af0a7230c9ad9edb3ca0ca81feffe17b3fc008 DOWNLOAD_DIR "${CMAKE_CURRENT_BINARY_DIR}/download/libdjinterop" INSTALL_DIR ${DJINTEROP_INSTALL_DIR} + LIST_SEPARATOR "|" CMAKE_ARGS -DBUILD_SHARED_LIBS=OFF -DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=ON -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE} -DCMAKE_INSTALL_PREFIX:PATH= - -DCMAKE_PREFIX_PATH:PATH=${CMAKE_PREFIX_PATH} + -DCMAKE_PREFIX_PATH=${PIPE_DELIMITED_CMAKE_PREFIX_PATH} -DCMAKE_INSTALL_LIBDIR:PATH=lib -DCMAKE_MODULE_PATH:PATH=${CMAKE_MODULE_PATH} -DSYSTEM_SQLITE=${DJINTEROP_SYSTEM_SQLITE}