From 4cdfecc8c5a72ae60e1d59f954fa7bd1d6fe0a18 Mon Sep 17 00:00:00 2001 From: Maxime Gimeno Date: Wed, 3 Jul 2019 10:27:14 +0200 Subject: [PATCH] A --- .../CMakeLists.txt | 40 +++++++++++-------- 1 file changed, 24 insertions(+), 16 deletions(-) diff --git a/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt b/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt index d81e155572f..9db05406c35 100644 --- a/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt +++ b/Polygonal_surface_reconstruction/test/Polygonal_surface_reconstruction/CMakeLists.txt @@ -35,39 +35,47 @@ include( CGAL_CreateSingleSourceCGALProgram ) create_single_source_cgal_program( "polygonal_surface_reconstruction_test.cpp" ) -find_package( SCIP QUIET) +find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater) +if(EIGEN3_FOUND) + include( ${EIGEN3_USE_FILE} ) -if (SCIP_FOUND) + # Executables that require Eigen 3.1 + find_package( SCIP QUIET) - include_directories( BEFORE ${SCIP_INCLUDE_DIRS} ) + if (SCIP_FOUND) - target_link_libraries( polygonal_surface_reconstruction_test PRIVATE ${SCIP_LIBRARIES} ) + include_directories( BEFORE ${SCIP_INCLUDE_DIRS} ) - target_compile_definitions(polygonal_surface_reconstruction_test PRIVATE -DCGAL_USE_SCIP) + target_link_libraries( polygonal_surface_reconstruction_test PRIVATE ${SCIP_LIBRARIES} ) - message("SCIP found and used") + target_compile_definitions(polygonal_surface_reconstruction_test PRIVATE -DCGAL_USE_SCIP) -endif() + message("SCIP found and used") + + endif() -find_package( GLPK QUIET) + find_package( GLPK QUIET) - if (GLPK_FOUND) + if (GLPK_FOUND) - include_directories( BEFORE ${GLPK_INCLUDE_DIR} ) + include_directories( BEFORE ${GLPK_INCLUDE_DIR} ) - target_link_libraries( polygonal_surface_reconstruction_test PRIVATE ${GLPK_LIBRARIES} ) + target_link_libraries( polygonal_surface_reconstruction_test PRIVATE ${GLPK_LIBRARIES} ) - target_compile_definitions(polygonal_surface_reconstruction_test PRIVATE -DCGAL_USE_GLPK) + target_compile_definitions(polygonal_surface_reconstruction_test PRIVATE -DCGAL_USE_GLPK) - message("GLPK found and used") + message("GLPK found and used") -endif() + endif() -if (NOT SCIP_FOUND AND NOT GLPK_FOUND) + if (NOT SCIP_FOUND AND NOT GLPK_FOUND) - message(STATUS "NOTICE: This project requires either SCIP or GLPK, and will not be compiled. " + message(STATUS "NOTICE: This project requires either SCIP or GLPK, and will not be compiled. " "Please provide either 'SCIP_DIR' or 'GLPK_INCLUDE_DIR' and 'GLPK_LIBRARIES'") + endif() +else() + message(STATUS "NOTICE: Some of the executables in this directory need Eigen 3.1 (or greater) and will not be compiled.") endif()