diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index 73386fe866f..dff9443245f 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -864,8 +864,10 @@ endif() if(NOT CGAL_HEADER_ONLY) create_CGALconfig_files() else() - configure_file("${CGAL_MODULES_DIR}/CGALConfig_binary_header_only.cmake.in" - "${CMAKE_BINARY_DIR}/CGALConfig.cmake" @ONLY) + if(NOT EXISTS "${CMAKE_BINARY_DIR}/CGALConfig.cmake") + configure_file("${CGAL_MODULES_DIR}/CGALConfig_binary_header_only.cmake.in" + "${CMAKE_BINARY_DIR}/CGALConfig.cmake" @ONLY) + endif() endif() #-------------------------------------------------------------------------------------------------- diff --git a/Installation/src/CMakeLists.txt b/Installation/src/CMakeLists.txt index d201c9ebcb0..caf995799b3 100644 --- a/Installation/src/CMakeLists.txt +++ b/Installation/src/CMakeLists.txt @@ -135,7 +135,9 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CGAL_RUNTIME_DIR}) # TODO: Seems useless, because it is called again in ../CMakeLists.txt # Should probably be removed. -- Laurent Rineau, 2014/07/22 -create_CGALconfig_files() +if(NOT CGAL_HEADER_ONLY) + create_CGALconfig_files() +endif() set(CGAL_DIR ${CMAKE_BINARY_DIR})