diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index 7ae6e11904d..b97ea8d4a59 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -1204,6 +1204,8 @@ You must disable CGAL_ENABLE_CHECK_HEADERS and CGAL_COMPUTE_DEPENDENCIES.") if(POLICY CMP0057) cmake_policy(SET CMP0057 NEW) endif() + #get build dir for removal from deps + get_filename_component(BUILD_DIR ${CMAKE_BINARY_DIR} NAME) foreach (package ${CGAL_CONFIGURED_PACKAGES_NAMES}) if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include) set(check_pkg_headers_depends "") diff --git a/Installation/cmake/modules/process_dependencies.cmake b/Installation/cmake/modules/process_dependencies.cmake index 25aff19b907..084042e89b5 100644 --- a/Installation/cmake/modules/process_dependencies.cmake +++ b/Installation/cmake/modules/process_dependencies.cmake @@ -8,6 +8,9 @@ if(NOT CGAL_PACKAGES_PREFIX) endif() #message("regexp: \\. ${CGAL_PACKAGES_PREFIX}/[^/]*/include/CGAL/.*h") +#TO BE CHECKED +get_filename_component(INSTALLATION "${CMAKE_BINARY_DIR}" DIRECTORY) +get_filename_component(BUILD_DIR "${INSTALLATION}" NAME) foreach(INPUT_FILE ${INPUT_FILES}) file(STRINGS ${INPUT_FILE} input) #message("input is : ${input}") @@ -15,6 +18,7 @@ foreach(INPUT_FILE ${INPUT_FILES}) string(REGEX MATCHALL "^\\.* ${CGAL_PACKAGES_PREFIX}/[A-Za-z0-9_.-]*/include/CGAL/[A-Za-z0-9_/.-]*\\.h" header ${line}) string(REGEX REPLACE "\\.* ${CGAL_PACKAGES_PREFIX}/" "" header "${header}") string(REGEX REPLACE "/.*" "" pkg "${header}") + string(REPLACE "${BUILD_DIR}" " " pkg "${pkg}") if(header) list(APPEND headers ${header}) endif()