From f674cc1cd1634ebf9684bc6a81769f54c855191c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 31 Oct 2016 15:52:11 +0100 Subject: [PATCH] add a hardcoded fall back for the installation prefix in case of no common setting, the installation cannot be relocated automatically --- Installation/cmake/modules/CGALConfig_install.cmake.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Installation/cmake/modules/CGALConfig_install.cmake.in b/Installation/cmake/modules/CGALConfig_install.cmake.in index 311d3518134..ea644ba9ade 100644 --- a/Installation/cmake/modules/CGALConfig_install.cmake.in +++ b/Installation/cmake/modules/CGALConfig_install.cmake.in @@ -15,6 +15,12 @@ set(CGAL_HEADER_ONLY "@CGAL_HEADER_ONLY@" ) # CGAL_DIR is the directory where this CGALConfig.cmake is installed string(REPLACE "@CGAL_INSTALL_CMAKE_DIR@" "" CGAL_INSTALL_PREFIX "${CGAL_CONFIG_DIR}") + if(NOT EXISTS "${CGAL_INSTALL_PREFIX}/@CGAL_INSTALL_CMAKE_DIR@/CGALConfig.cmake") + # Cannot compute CGAL_INSTALL_PREFIX! + # Use the CMake prefix chosen at compile time. + set(CGAL_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@") + endif() + set(CGAL_MAJOR_VERSION "@CGAL_MAJOR_VERSION@" ) set(CGAL_MINOR_VERSION "@CGAL_MINOR_VERSION@" ) set(CGAL_BUGFIX_VERSION "@CGAL_BUGFIX_VERSION@" )