fix install dir references for debian
authorDebian Science Maintainers <debian-science-maintainers@lists.alioth.debian.org>
Wed, 2 Oct 2024 20:00:00 +0000 (22:00 +0200)
committerSantiago Vila <sanvila@debian.org>
Wed, 2 Oct 2024 20:00:00 +0000 (22:00 +0200)
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

CMakeLists.txt
adm/cmake/occt_macros.cmake

index 86905287dc804eb1065dbe46c20ae7f2e13c4e3d..036055c15e9a73b8b47124257c33517e2899a202 100644 (file)
@@ -1275,7 +1275,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 "file(INSTALL FILES \"${CMAKE_BINARY_DIR}/OpenCASCADECompileDefinitionsAndFlags-\${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake\" DESTINATION \"${INSTALL_DIR}/${INSTALL_DIR_CMAKE}/\" TYPE FILE)")
+install (CODE "file(INSTALL FILES \"${CMAKE_BINARY_DIR}/OpenCASCADECompileDefinitionsAndFlags-\${CMAKE_INSTALL_CONFIG_NAME_LOWER}.cmake\" DESTINATION \"$ENV{DESTDIR}${INSTALL_DIR}/${INSTALL_DIR_CMAKE}/\" TYPE FILE)")
 
 foreach (OCCT_MODULE ${OCCT_MODULES})
   if (BUILD_MODULE_${OCCT_MODULE})
index 9fd3ec4cfbcf39a36b16bec27b5750f36ba0db93..c992c2e942b1e3141cc8a1dac53149d20bef2c13 100644 (file)
@@ -592,7 +592,7 @@ macro (OCCT_UPDATE_TARGET_FILE)
 
   install (CODE
   "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}\")