From: Debian Science Maintainers Date: Thu, 20 Oct 2022 20:08:48 +0000 (+0100) Subject: fix install dir references for debian X-Git-Tag: archive/raspbian/7.6.3+dfsg1-5+rpi1^2~12 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=358ad9baca846d6ae56f6b29dd77a6134ebd6d9f;p=opencascade.git fix install dir references for debian Origin: vendor, https://aur.archlinux.org/cgit/aur.git/tree/fix-install-dir-references.patch?h=opencascade7 This patch fixes cmake install dir references and comes from the opencascade7 package on the ArchLinux User Repository. Gbp-Pq: Name fix-install-dir-references.diff --- diff --git a/CMakeLists.txt b/CMakeLists.txt index f4ec871f5..459f71b29 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1231,7 +1231,7 @@ foreach (OCCT_CONFIGURATION ${CMAKE_CONFIGURATION_TYPES}) endforeach() # install OpenCASCADE config file with compile definitions and C/C++ flags ONLY for current configuration install (CODE "string (TOLOWER \"\${CMAKE_INSTALL_CONFIG_NAME}\" CMAKE_INSTALL_CONFIG_NAME_LOWER)") -install (CODE "configure_file(\"${CMAKE_BINARY_DIR}/OpenCASCADECompileDefinitionsAndFlags-\${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake\" \"${INSTALL_DIR}/${INSTALL_DIR_CMAKE}/OpenCASCADECompileDefinitionsAndFlags-\${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake\" COPYONLY)") +install (CODE "configure_file(\"${CMAKE_BINARY_DIR}/OpenCASCADECompileDefinitionsAndFlags-\${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake\" \"\$ENV{DESTDIR}${INSTALL_DIR}/${INSTALL_DIR_CMAKE}/OpenCASCADECompileDefinitionsAndFlags-\${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake\" COPYONLY)") foreach (OCCT_MODULE ${OCCT_MODULES}) if (BUILD_MODULE_${OCCT_MODULE}) diff --git a/adm/cmake/occt_macros.cmake b/adm/cmake/occt_macros.cmake index 0a3879452..e3f13923f 100644 --- a/adm/cmake/occt_macros.cmake +++ b/adm/cmake/occt_macros.cmake @@ -592,7 +592,7 @@ macro (OCCT_UPDATE_TARGET_FILE) "cmake_policy(PUSH) cmake_policy(SET CMP0007 NEW) string (TOLOWER \"\${CMAKE_INSTALL_CONFIG_NAME}\" CMAKE_INSTALL_CONFIG_NAME_LOWERCASE) - file (GLOB ALL_OCCT_TARGET_FILES \"${INSTALL_DIR}/${INSTALL_DIR_CMAKE}/OpenCASCADE*Targets-\${CMAKE_INSTALL_CONFIG_NAME_LOWERCASE}.cmake\") + file (GLOB ALL_OCCT_TARGET_FILES \"\$ENV{DESTDIR}${INSTALL_DIR}/${INSTALL_DIR_CMAKE}/OpenCASCADE*Targets-\${CMAKE_INSTALL_CONFIG_NAME_LOWERCASE}.cmake\") foreach(TARGET_FILENAME \${ALL_OCCT_TARGET_FILES}) file (STRINGS \"\${TARGET_FILENAME}\" TARGET_FILE_CONTENT) file (REMOVE \"\${TARGET_FILENAME}\")