From d27f1eec32b005b1a51bf228e1753cac644f5bd1 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 20 Jan 2012 13:36:11 +0000 Subject: [PATCH] Allow branch-build+WITH_examples|WITH_demos on Windows too Call bash /full/path/to/cgal_create_cmake_scripts now --- Installation/CMakeLists.txt | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index 6dfdf16e2d3..005130c4e13 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -40,6 +40,12 @@ if ( CGAL_BRANCH_BUILD ) endif() endforeach() + find_program(CGAL_CREATE_CMAKE_SCRIPT cgal_create_cmake_script + HINT ${CMAKE_SOURCE_DIR}/Scripts/scripts + DOC "Script cgal_create_cmake_script, that creates CMakeLists.txt files" + NO_DEFAULT_PATH + NO_CMAKE_ENVIRONMENT_PATH) + if (DEFINED CGAL_WRONG_PACKAGES) message(STATUS "Removed not-a-package: ${CGAL_WRONG_PACKAGES}") list(REMOVE_ITEM CGAL_CONFIGURED_PACKAGES ${CGAL_WRONG_PACKAGES}) @@ -735,14 +741,16 @@ function(process_CGAL_subdirectory entry subdir type_name) if(EXISTS ${entry}/CMakeLists.txt) add_subdirectory( ${entry} ${CMAKE_BINARY_DIR}/${subdir}/${ENTRY_DIR_NAME} ) else() -# message("cgal_create_cmake_script ${type_name} --source_dir ${entry}") - execute_process( - COMMAND cgal_create_cmake_script ${type_name} --source_dir "${entry}" - WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/${subdir}/${ENTRY_DIR_NAME}" - RESULT_VARIABLE RESULT_VAR) - if(NOT RESULT_VAR) -# message("Subdir ${CMAKE_BINARY_DIR}/${subdir}/${ENTRY_DIR_NAME}") - add_subdirectory( "${CMAKE_BINARY_DIR}/${subdir}/${ENTRY_DIR_NAME}" "${CMAKE_BINARY_DIR}/${subdir}/${ENTRY_DIR_NAME}") + if(CGAL_CREATE_CMAKE_SCRIPT) +# message("bah ${CGAL_CREATE_CMAKE_SCRIPT} ${type_name} --source_dir ${entry}") + execute_process( + COMMAND bash ${CGAL_CREATE_CMAKE_SCRIPT} ${type_name} --source_dir "${entry}" + WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/${subdir}/${ENTRY_DIR_NAME}" + RESULT_VARIABLE RESULT_VAR) + if(NOT RESULT_VAR) +# message("Subdir ${CMAKE_BINARY_DIR}/${subdir}/${ENTRY_DIR_NAME}") + add_subdirectory( "${CMAKE_BINARY_DIR}/${subdir}/${ENTRY_DIR_NAME}" "${CMAKE_BINARY_DIR}/${subdir}/${ENTRY_DIR_NAME}") + endif() endif() endif() else()