Files
MINGW-packages/mingw-w64-cgal/msys2-relocate-cmake-config.patch
Ray Donnelly 34ea54e4f1 cgal: Relocate CMake configure
This fix needs to be applied to all of our CMake library
projects.
2015-06-26 10:20:14 +01:00

29 lines
1.4 KiB
Diff

diff -urN CGAL-4.5.orig/cmake/modules/CGALConfig_binary.cmake.in CGAL-4.5/cmake/modules/CGALConfig_binary.cmake.in
--- CGAL-4.5.orig/cmake/modules/CGALConfig_binary.cmake.in 2015-06-26 09:41:08.742156800 +0100
+++ CGAL-4.5/cmake/modules/CGALConfig_binary.cmake.in 2015-06-26 09:48:21.337089400 +0100
@@ -8,6 +8,10 @@
set(CGAL_CONFIG_LOADED TRUE)
+# MSYS2's PKGBUILD package() function replaces absolute build machine paths
+# with references to this variable in order to relocate the installation.
+get_filename_component(RELOCATED_INSTALL_PREFIX "${CMAKE_CURRENT_LIST_DIR}/../.." REALPATH)
+
set(CGAL_INSTALLATION_PACKAGE_DIR "@CGAL_INSTALLATION_PACKAGE_DIR@")
set(CGAL_CORE_PACKAGE_DIR "@CGAL_CORE_PACKAGE_DIR@")
diff -urN CGAL-4.5.orig/cmake/modules/CGALConfig_install.cmake.in CGAL-4.5/cmake/modules/CGALConfig_install.cmake.in
--- CGAL-4.5.orig/cmake/modules/CGALConfig_install.cmake.in 2015-06-26 09:41:08.743156900 +0100
+++ CGAL-4.5/cmake/modules/CGALConfig_install.cmake.in 2015-06-26 09:47:53.180013900 +0100
@@ -8,6 +8,10 @@
set(CGAL_CONFIG_LOADED TRUE)
+# MSYS2's PKGBUILD package() function replaces absolute build machine paths
+# with references to this variable in order to relocate the installation.
+get_filename_component(RELOCATED_INSTALL_PREFIX "${CMAKE_CURRENT_LIST_DIR}/../.." REALPATH)
+
# CGAL_DIR is the directory where this CGALConfig.cmake is installed
set(CGAL_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@")