Make CMakeLists.txt work for VC++

This commit is contained in:
Andreas Fabri 2016-11-24 10:51:17 +01:00 committed by Mael Rouxel-Labbé
parent 37e35eeea8
commit a58a568217
1 changed files with 30 additions and 7 deletions

View File

@ -27,16 +27,39 @@ if ( CGAL_FOUND )
# If not found automatically, set SuiteSparse_DIR in CMake to the
# directory where SuiteSparse was built.
# ------------------------------------------------------------------
# set(SuiteSparse_VERBOSE ON)
set(SuiteSparse_USE_LAPACK_BLAS ON)
find_package(SuiteSparse QUIET) # Use FindSuiteSparse.cmake module
if(SuiteSparse_FOUND)
set(SuiteSparse_USE_LAPACK_BLAS ON)
find_package(SuiteSparse QUIET NO_MODULE) # 1st: Try to locate the *config.cmake file.
if(NOT SuiteSparse_FOUND)
set(SuiteSparse_VERBOSE ON)
find_package(SuiteSparse QUIET) # 2nd: Use FindSuiteSparse.cmake module
if(SuiteSparse_FOUND )
include_directories(${SuiteSparse_INCLUDE_DIRS})
endif()
else()
include(${USE_SuiteSparse})
endif()
if(SuiteSparse_FOUND)
message(STATUS "SuiteSparse_LIBS: ${SuiteSparse_LIBRARIES}")
include_directories(${SuiteSparse_INCLUDE_DIRS})
add_definitions(-DCGAL_SMP_USE_SPARSESUITE_SOLVERS)
else(SuiteSparse_FOUND)
else(SuiteSparse_FOUND)
message(STATUS "NOTICE: The example `orbital.cpp` will be compiled without the Sparsesuite library.")
endif(SuiteSparse_FOUND)
endif(SuiteSparse_FOUND)
# set(SuiteSparse_VERBOSE ON)
# set(SuiteSparse_USE_LAPACK_BLAS ON)
# find_package(SuiteSparse REQUIRED COMPONENTS suitesparse ) # Use FindSuiteSparse.cmake module
# if(SuiteSparse_FOUND)
# message(STATUS "SuiteSparse_LIBS: ${SuiteSparse_LIBRARIES}")
# include_directories(${SuiteSparse_INCLUDE_DIRS})
# add_definitions(-DCGAL_SMP_USE_SPARSESUITE_SOLVERS)
# else(SuiteSparse_FOUND)
# message(STATUS "NOTICE: The example `orbital.cpp` will be compiled without the Sparsesuite library.")
# endif(SuiteSparse_FOUND)
# ------------------------------------------------------------------
# End of SuiteSparse detection