add a hardcoded fall back for the installation prefix

in case of no common setting, the installation cannot be
relocated automatically
This commit is contained in:
Sébastien Loriot 2016-10-31 15:52:11 +01:00
parent 0facc2fb8a
commit f674cc1cd1
1 changed files with 6 additions and 0 deletions

View File

@ -15,6 +15,12 @@ set(CGAL_HEADER_ONLY "@CGAL_HEADER_ONLY@" )
# CGAL_DIR is the directory where this CGALConfig.cmake is installed # CGAL_DIR is the directory where this CGALConfig.cmake is installed
string(REPLACE "@CGAL_INSTALL_CMAKE_DIR@" "" CGAL_INSTALL_PREFIX "${CGAL_CONFIG_DIR}") 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_MAJOR_VERSION "@CGAL_MAJOR_VERSION@" )
set(CGAL_MINOR_VERSION "@CGAL_MINOR_VERSION@" ) set(CGAL_MINOR_VERSION "@CGAL_MINOR_VERSION@" )
set(CGAL_BUGFIX_VERSION "@CGAL_BUGFIX_VERSION@" ) set(CGAL_BUGFIX_VERSION "@CGAL_BUGFIX_VERSION@" )