...
 
Commits (13)
...@@ -103,15 +103,18 @@ if (SUITESPARSE_FOUND ) ...@@ -103,15 +103,18 @@ if (SUITESPARSE_FOUND )
list( APPEND COMISO_INCLUDE_DIRECTORIES ${SUITESPARSE_INCLUDE_DIRS} ) list( APPEND COMISO_INCLUDE_DIRECTORIES ${SUITESPARSE_INCLUDE_DIRS} )
list( APPEND COMISO_LINK_DIRECTORIES ${SUITESPARSE_LIBRARY_DIRS} ) list( APPEND COMISO_LINK_DIRECTORIES ${SUITESPARSE_LIBRARY_DIRS} )
list( APPEND COMISO_LINK_LIBRARIES ${SUITESPARSE_LIBRARIES} ) list( APPEND COMISO_LINK_LIBRARIES ${SUITESPARSE_LIBRARIES} )
# special handling, since spqr is incorrect in several distributions
if(SUITESPARSE_SPQR_VALID)
set (COMISO_SUITESPARSE_SPQR_CONFIG_FILE_SETTINGS "#define COMISO_SUITESPARSE_SPQR_AVAILABLE 1" )
else()
message (STATUS "SUITESPARSE SPQR seems to be invalid!")
set (COMISO_SUITESPARSE_SPQR_CONFIG_FILE_SETTINGS "#define COMISO_SUITESPARSE_SPQR_AVAILABLE 0" )
endif()
else () else ()
message (STATUS "SUITESPARSE not found!") message (STATUS "SUITESPARSE not found!")
set (COMISO_SUITESPARSE_CONFIG_FILE_SETTINGS "#define COMISO_SUITESPARSE_AVAILABLE 0" ) set (COMISO_SUITESPARSE_CONFIG_FILE_SETTINGS "#define COMISO_SUITESPARSE_AVAILABLE 0" )
endif ()
# special handling, since spqr is incorrect in several distributions
if(SUITESPARSE_SPQR_VALID)
set (COMISO_SUITESPARSE_SPQR_CONFIG_FILE_SETTINGS "#define COMISO_SUITESPARSE_SPQR_AVAILABLE 1" )
else()
message (STATUS "SUITESPARSE SPQR seems to be invalid!")
set (COMISO_SUITESPARSE_SPQR_CONFIG_FILE_SETTINGS "#define COMISO_SUITESPARSE_SPQR_AVAILABLE 0" ) set (COMISO_SUITESPARSE_SPQR_CONFIG_FILE_SETTINGS "#define COMISO_SUITESPARSE_SPQR_AVAILABLE 0" )
endif() endif()
...@@ -390,6 +393,10 @@ if ( QT5_FOUND ) ...@@ -390,6 +393,10 @@ if ( QT5_FOUND )
list (APPEND COMISO_LINK_LIBRARIES ${QT_LIBRARIES}) list (APPEND COMISO_LINK_LIBRARIES ${QT_LIBRARIES})
endif() endif()
# TODO: remove this line when we can assume people have a cmake 3.13.
# Then link directories is set as target property below.
link_directories(${COMISO_LINK_DIRECTORIES})
acg_add_library (CoMISo SHARED ${ui} ${sources} ${headers} ) acg_add_library (CoMISo SHARED ${ui} ${sources} ${headers} )
target_include_directories (CoMISo PUBLIC target_include_directories (CoMISo PUBLIC
...@@ -402,9 +409,14 @@ target_include_directories (CoMISo PUBLIC ...@@ -402,9 +409,14 @@ target_include_directories (CoMISo PUBLIC
${COMISO_INCLUDE_DIRECTORIES} ${COMISO_INCLUDE_DIRECTORIES}
) )
set_target_properties(CoMISo PROPERTIES LINK_DIRECTORIES get_target_property(INC_DIRS CoMISo INCLUDE_DIRECTORIES)
${COMISO_LINK_DIRECTORIES} message("Target CoMISo include dirs: ${INC_DIRS}")
) message("COMISO_INCLUDE_DIRECTORIES: ${COMISO_INCLUDE_DIRECTORIES}")
message("COMISO_LINK_DIRECTORIES: ${COMISO_LINK_DIRECTORIES}")
if (COMISO_LINK_DIRECTORIES)
set_target_properties(CoMISo PROPERTIES LINK_DIRECTORIES ${COMISO_LINK_DIRECTORIES})
endif()
# generate dllexport macros on windows # generate dllexport macros on windows
if (WIN32) if (WIN32)
......
...@@ -70,16 +70,19 @@ if (WIN32) ...@@ -70,16 +70,19 @@ if (WIN32)
set ( IPOPT_LIBRARY "optimized;${IPOPT_LIBRARY_RELEASE};debug;${IPOPT_LIBRARY_DEBUG}" CACHE STRING "IPOPT Libraries" ) set ( IPOPT_LIBRARY "optimized;${IPOPT_LIBRARY_RELEASE};debug;${IPOPT_LIBRARY_DEBUG}" CACHE STRING "IPOPT Libraries" )
GET_FILENAME_COMPONENT(IPOPT_LIBRARY_DIR ${IPOPT_LIBRARY_RELEASE} PATH ) GET_FILENAME_COMPONENT(IPOPT_LIBRARY_DIR ${IPOPT_LIBRARY_RELEASE} PATH )
MARK_AS_ADVANCED(IPOPT_LIBRARY_DIR) MARK_AS_ADVANCED(IPOPT_LIBRARY_DIR)
SET(IPOPT_FOUND TRUE) SET(IPOPT_FOUND TRUE)
SET(IPOPT_INCLUDE_DIR ${IPOPT_INCLUDE_DIR}) SET(IPOPT_INCLUDE_DIRS ${IPOPT_INCLUDE_DIR})
SET(IPOPT_LIBRARY_DIRS ${IPOPT_LIBRARY_DIR})
set(IPOPT_LIBRARIES "${IPOPT_LIBRARY}" )
# Todo, set right version depending on build type (debug/release) # Todo, set right version depending on build type (debug/release)
#GET_FILENAME_COMPONENT( IPOPT_LIBRARY_DIR ${GLEW_LIBRARY} PATH ) #GET_FILENAME_COMPONENT( IPOPT_LIBRARY_DIRS ${GLEW_LIBRARY} PATH )
ELSE(IPOPT_INCLUDE_DIR) ELSE(IPOPT_INCLUDE_DIR)
SET(IPOPT_FOUND FALSE) SET(IPOPT_FOUND FALSE)
SET(IPOPT_INCLUDE_DIR ${IPOPT_INCLUDE_DIR}) SET(IPOPT_INCLUDE_DIRS ${IPOPT_INCLUDE_DIR})
ENDIF(IPOPT_INCLUDE_DIR) ENDIF(IPOPT_INCLUDE_DIR)
ELSE( WIN32 ) ELSE( WIN32 )
...@@ -117,17 +120,18 @@ ELSE( WIN32 ) ...@@ -117,17 +120,18 @@ ELSE( WIN32 )
PATHS "/usr/lib" ) PATHS "/usr/lib" )
set(IPOPT_LIBRARY_DIRS "${IPOPT_LIBRARY_DIR}" )
set(IPOPT_INCLUDE_DIRS "${IPOPT_INCLUDE_DIR}" )
set(IPOPT_LIBRARIES "${IPOPT_LIBRARY}" )
IF( IPOPT_HSL_LIBRARY_DIR) IF( IPOPT_HSL_LIBRARY_DIR)
IF( NOT IPOPT_FIND_QUIETLY ) IF( NOT IPOPT_FIND_QUIETLY )
message ( "IPOPT_HSL_LIBRARY_DIR found at ${IPOPT_HSL_LIBRARY_DIR} ") message ( "IPOPT_HSL_LIBRARY_DIR found at ${IPOPT_HSL_LIBRARY_DIR} ")
ENDIF() ENDIF()
set(IPOPT_LIBRARY_DIR ${IPOPT_HSL_LIBRARY_DIR})
LIST( APPEND IPOPT_LIBRARY_DIRS "${IPOPT_HSL_LIBRARY_DIR}") LIST( APPEND IPOPT_LIBRARY_DIRS "${IPOPT_HSL_LIBRARY_DIR}")
ENDIF(IPOPT_HSL_LIBRARY_DIR) ENDIF(IPOPT_HSL_LIBRARY_DIR)
set(IPOPT_INCLUDE_DIRS "${IPOPT_INCLUDE_DIR}" )
set(IPOPT_LIBRARIES "${IPOPT_LIBRARY}" )
IF(IPOPT_HSL_LIBRARY) IF(IPOPT_HSL_LIBRARY)
LIST( APPEND IPOPT_LIBRARIES "${IPOPT_HSL_LIBRARY}") LIST( APPEND IPOPT_LIBRARIES "${IPOPT_HSL_LIBRARY}")
......
...@@ -10,172 +10,175 @@ ...@@ -10,172 +10,175 @@
# SUITESPARSE_LIBRARY_DIRS - all Library directories containing suitesparse libs # SUITESPARSE_LIBRARY_DIRS - all Library directories containing suitesparse libs
# SUITESPARSE_SPQR_VALID - automatic identification whether or not spqr package is installed correctly # SUITESPARSE_SPQR_VALID - automatic identification whether or not spqr package is installed correctly
IF (SUITESPARSE_INCLUDE_DIRS) if (SUITESPARSE_INCLUDE_DIRS)
# Already in cache, be silent # Already in cache, be silent
SET(SUITESPARSE_FIND_QUIETLY TRUE) SET(SUITESPARSE_FIND_QUIETLY TRUE)
ENDIF (SUITESPARSE_INCLUDE_DIRS) endif (SUITESPARSE_INCLUDE_DIRS)
if( WIN32 ) if( WIN32 )
# Find cholmod part of the suitesparse library collection # Find cholmod part of the suitesparse library collection
# Check if the base path is set # Check if the base path is set
if ( NOT CMAKE_WINDOWS_LIBS_DIR ) if ( NOT CMAKE_WINDOWS_LIBS_DIR )
# This is the base directory for windows library search used in the finders we shipp. # This is the base directory for windows library search used in the finders we shipp.
set(CMAKE_WINDOWS_LIBS_DIR "c:/libs" CACHE STRING "Default Library search dir on windows." ) set(CMAKE_WINDOWS_LIBS_DIR "c:/libs" CACHE STRING "Default Library search dir on windows." )
endif() endif()
if ( CMAKE_GENERATOR MATCHES "^Visual Studio 11.*Win64" ) if ( CMAKE_GENERATOR MATCHES "^Visual Studio 11.*Win64" )
SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2012/x64/") SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2012/x64/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 11.*" ) elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 11.*" )
SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2012/x32/") SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2012/x32/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 12.*Win64" ) elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 12.*Win64" )
SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2013/x64/") SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2013/x64/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 12.*" ) elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 12.*" )
SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2013/x32/") SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2013/x32/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 14.*Win64" ) elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 14.*Win64" )
SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2015/x64/") SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2015/x64/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 14.*" ) elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 14.*" )
SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2015/x32/") SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2015/x32/")
endif() endif()
FIND_PATH( CHOLMOD_INCLUDE_DIR cholmod.h FIND_PATH( CHOLMOD_INCLUDE_DIR cholmod.h
PATHS "C:\\libs\\win32\\SuiteSparse\\Include" PATHS "C:\\libs\\win32\\SuiteSparse\\Include"
"${VS_SEARCH_PATH}" "${VS_SEARCH_PATH}"
PATH_SUFFIXES suitesparse-4.2.1/include/suitesparse PATH_SUFFIXES suitesparse-4.2.1/include/suitesparse
suitesparse-metis-for-windows-1.2.2-install/include/suitesparse suitesparse-metis-for-windows-1.2.2-install/include/suitesparse
) )
# Add cholmod include directory to collection include directories # Add cholmod include directory to collection include directories
IF ( CHOLMOD_INCLUDE_DIR ) if ( CHOLMOD_INCLUDE_DIR )
list ( APPEND SUITESPARSE_INCLUDE_DIRS ${CHOLMOD_INCLUDE_DIR} ) list ( APPEND SUITESPARSE_INCLUDE_DIRS ${CHOLMOD_INCLUDE_DIR} )
ENDIF( CHOLMOD_INCLUDE_DIR ) endif( CHOLMOD_INCLUDE_DIR )
# find path suitesparse library # find path suitesparse library
FIND_PATH( SUITESPARSE_LIBRARY_DIRS FIND_PATH( SUITESPARSE_LIBRARY_DIRS
NAMES amd.lib libamd.lib NAMES amd.lib libamd.lib
PATHS "C:\\libs\\win32\\SuiteSparse\\libs" PATHS "C:\\libs\\win32\\SuiteSparse\\libs"
"${VS_SEARCH_PATH}" "${VS_SEARCH_PATH}"
PATH_SUFFIXES suitesparse-4.2.1/lib64 PATH_SUFFIXES suitesparse-4.2.1/lib64
suitesparse-metis-for-windows-1.2.2-install/lib64 ) suitesparse-metis-for-windows-1.2.2-install/lib64 )
# if we found the library, add it to the defined libraries # if we found the library, add it to the defined libraries
IF ( SUITESPARSE_LIBRARY_DIRS ) if ( SUITESPARSE_LIBRARY_DIRS )
if ( EXISTS "${SUITESPARSE_LIBRARY_DIRS}/libamd.lib" ) if ( EXISTS "${SUITESPARSE_LIBRARY_DIRS}/libamd.lib" )
list ( APPEND SUITESPARSE_LIBRARY_DIRS "${SUITESPARSE_LIBRARY_DIRS}/lapack_blas_windows") # because liblapack.lib lies here list ( APPEND SUITESPARSE_LIBRARY_DIRS "${SUITESPARSE_LIBRARY_DIRS}/lapack_blas_windows") # because liblapack.lib lies here
list ( APPEND SUITESPARSE_LIBRARIES optimized;libamd;optimized;libcamd;optimized;libccolamd;optimized;libcholmod;optimized;libcolamd;optimized;metis;optimized;libspqr;optimized;libumfpack;debug;libamdd;debug;libcamdd;debug;libccolamdd;debug;libcholmodd;debug;libspqrd;debug;libumfpackd;debug;libcolamdd;debug;metisd;optimized;liblapack;debug;liblapackd;optimized;suitesparseconfig;debug;suitesparseconfigd ) list ( APPEND SUITESPARSE_LIBRARIES optimized;libamd;optimized;libcamd;optimized;libccolamd;optimized;libcholmod;optimized;libcolamd;optimized;metis;optimized;libspqr;optimized;libumfpack;debug;libamdd;debug;libcamdd;debug;libccolamdd;debug;libcholmodd;debug;libspqrd;debug;libumfpackd;debug;libcolamdd;debug;metisd;optimized;liblapack;debug;liblapackd;optimized;suitesparseconfig;debug;suitesparseconfigd )
else() else()
list ( APPEND SUITESPARSE_LIBRARIES optimized;amd;optimized;camd;optimized;ccolamd;optimized;cholmod;optimized;colamd;optimized;metis;optimized;spqr;optimized;umfpack;debug;amdd;debug;camdd;debug;ccolamdd;debug;cholmodd;debug;spqrd;debug;umfpackd;debug;colamdd;debug;metisd;optimized;blas;optimized;libf2c;optimized;lapack;debug;blasd;debug;libf2cd;debug;lapackd ) list ( APPEND SUITESPARSE_LIBRARIES optimized;amd;optimized;camd;optimized;ccolamd;optimized;cholmod;optimized;colamd;optimized;metis;optimized;spqr;optimized;umfpack;debug;amdd;debug;camdd;debug;ccolamdd;debug;cholmodd;debug;spqrd;debug;umfpackd;debug;colamdd;debug;metisd;optimized;blas;optimized;libf2c;optimized;lapack;debug;blasd;debug;libf2cd;debug;lapackd )
endif() endif()
if(EXISTS "${CHOLMOD_INCLUDE_DIR}/SuiteSparseQR.hpp") if(EXISTS "${CHOLMOD_INCLUDE_DIR}/SuiteSparseQR.hpp")
SET(SUITESPARSE_SPQR_VALID TRUE CACHE BOOL "SuiteSparseSPQR valid") SET(SUITESPARSE_SPQR_VALID TRUE CACHE BOOL "SuiteSparseSPQR valid")
else() else()
SET(SUITESPARSE_SPQR_VALID FALSE CACHE BOOL "SuiteSparseSPQR valid") SET(SUITESPARSE_SPQR_VALID FALSE CACHE BOOL "SuiteSparseSPQR valid")
endif() endif()
if(SUITESPARSE_SPQR_VALID) if(SUITESPARSE_SPQR_VALID)
FIND_LIBRARY( SUITESPARSE_SPQR_LIBRARY FIND_LIBRARY( SUITESPARSE_SPQR_LIBRARY
NAMES libspqr NAMES libspqr
PATHS ${SUITESPARSE_LIBRARY_DIRS} ) PATHS ${SUITESPARSE_LIBRARY_DIRS} )
IF (SUITESPARSE_SPQR_LIBRARY) if (SUITESPARSE_SPQR_LIBRARY)
list ( APPEND SUITESPARSE_LIBRARIES optimized;libspqr;debug;libspqrd) list ( APPEND SUITESPARSE_LIBRARIES optimized;libspqr;debug;libspqrd)
ENDIF (SUITESPARSE_SPQR_LIBRARY) else(SUITESPARSE_SPQR_LIBRARY)
endif() SET(SUITESPARSE_SPQR_VALID FALSE)
endif (SUITESPARSE_SPQR_LIBRARY)
endif()
ENDIF( SUITESPARSE_LIBRARY_DIRS )
endif( SUITESPARSE_LIBRARY_DIRS )
else( WIN32 ) else( WIN32 )
IF( APPLE) if( APPLE)
FIND_PATH( CHOLMOD_INCLUDE_DIR cholmod.h FIND_PATH( CHOLMOD_INCLUDE_DIR cholmod.h
PATHS /opt/local/include/ufsparse ) PATHS /opt/local/include/ufsparse )
FIND_PATH( SUITESPARSE_LIBRARY_DIR FIND_PATH( SUITESPARSE_LIBRARY_DIR
NAMES libSuiteSparse.dylib NAMES libSuiteSparse.dylib
PATHS /opt/local/lib ) PATHS /opt/local/lib )
list ( APPEND SUITESPARSE_LIBRARY_DIRS ${SUITESPARSE_LIBRARY_DIR} ) message("SUITESPARSE_LIBRARY_DIR: ${SUITESPARSE_LIBRARY_DIR}")
list ( APPEND SUITESPARSE_LIBRARY_DIRS ${SUITESPARSE_LIBRARY_DIR} )
list ( APPEND SUITESPARSE_LIBRARIES SuiteSparse)
list ( APPEND SUITESPARSE_LIBRARIES SuiteSparse)
ELSE(APPLE)
FIND_PATH( CHOLMOD_INCLUDE_DIR cholmod.h else(APPLE)
PATHS /usr/local/include FIND_PATH( CHOLMOD_INCLUDE_DIR cholmod.h
/usr/include PATHS /usr/local/include
/usr/include/suitesparse/ /usr/include
${CMAKE_SOURCE_DIR}/MacOS/Libs/cholmod /usr/include/suitesparse/
PATH_SUFFIXES cholmod/ CHOLMOD/ ) ${CMAKE_SOURCE_DIR}/MacOS/Libs/cholmod
PATH_SUFFIXES cholmod/ CHOLMOD/ )
FIND_PATH( SUITESPARSE_LIBRARY_DIR
NAMES libcholmod.so FIND_PATH( SUITESPARSE_LIBRARY_DIR
PATHS /usr/lib NAMES libcholmod.so
/usr/lib64 PATHS /usr/lib
/usr/local/lib /usr/lib64
/usr/lib/x86_64-linux-gnu ) /usr/local/lib
/usr/lib/x86_64-linux-gnu )
ENDIF(APPLE)
endif(APPLE)
# Add cholmod include directory to collection include directories
IF ( CHOLMOD_INCLUDE_DIR ) # Add cholmod include directory to collection include directories
list ( APPEND SUITESPARSE_INCLUDE_DIRS ${CHOLMOD_INCLUDE_DIR} ) if ( CHOLMOD_INCLUDE_DIR )
ENDIF( CHOLMOD_INCLUDE_DIR ) list ( APPEND SUITESPARSE_INCLUDE_DIRS ${CHOLMOD_INCLUDE_DIR} )
endif( CHOLMOD_INCLUDE_DIR )
# if we found the library, add it to the defined libraries
IF ( SUITESPARSE_LIBRARY_DIR ) # if we found the library, add it to the defined libraries
if ( SUITESPARSE_LIBRARY_DIR )
# Skipped, as this is set for apple in the block above
# if (NOT APPLE) # Skipped, as this is set for apple in the block above
list ( APPEND SUITESPARSE_LIBRARIES amd) # if (NOT APPLE)
list ( APPEND SUITESPARSE_LIBRARIES btf) list ( APPEND SUITESPARSE_LIBRARIES amd)
list ( APPEND SUITESPARSE_LIBRARIES camd) list ( APPEND SUITESPARSE_LIBRARIES btf)
list ( APPEND SUITESPARSE_LIBRARIES ccolamd) list ( APPEND SUITESPARSE_LIBRARIES camd)
list ( APPEND SUITESPARSE_LIBRARIES cholmod) list ( APPEND SUITESPARSE_LIBRARIES ccolamd)
list ( APPEND SUITESPARSE_LIBRARIES colamd) list ( APPEND SUITESPARSE_LIBRARIES cholmod)
# list ( APPEND SUITESPARSE_LIBRARIES csparse) list ( APPEND SUITESPARSE_LIBRARIES colamd)
list ( APPEND SUITESPARSE_LIBRARIES cxsparse) # list ( APPEND SUITESPARSE_LIBRARIES csparse)
list ( APPEND SUITESPARSE_LIBRARIES klu) list ( APPEND SUITESPARSE_LIBRARIES cxsparse)
# list ( APPEND SUITESPARSE_LIBRARIES spqr) list ( APPEND SUITESPARSE_LIBRARIES klu)
list ( APPEND SUITESPARSE_LIBRARIES umfpack) # list ( APPEND SUITESPARSE_LIBRARIES spqr)
# endif() list ( APPEND SUITESPARSE_LIBRARIES umfpack)
# endif()
# Metis and spqr are optional
FIND_LIBRARY( SUITESPARSE_METIS_LIBRARY # Metis and spqr are optional
NAMES metis FIND_LIBRARY( SUITESPARSE_METIS_LIBRARY
PATHS ${SUITESPARSE_LIBRARY_DIR} ) NAMES metis
IF (SUITESPARSE_METIS_LIBRARY) PATHS ${SUITESPARSE_LIBRARY_DIR} )
list ( APPEND SUITESPARSE_LIBRARIES ${SUITESPARSE_METIS_LIBRARY}) if (SUITESPARSE_METIS_LIBRARY)
ENDIF(SUITESPARSE_METIS_LIBRARY) list ( APPEND SUITESPARSE_LIBRARIES ${SUITESPARSE_METIS_LIBRARY})
endif(SUITESPARSE_METIS_LIBRARY)
if(EXISTS "${CHOLMOD_INCLUDE_DIR}/SuiteSparseQR.hpp")
SET(SUITESPARSE_SPQR_VALID TRUE CACHE BOOL "SuiteSparseSPQR valid") if(EXISTS "${CHOLMOD_INCLUDE_DIR}/SuiteSparseQR.hpp")
else() SET(SUITESPARSE_SPQR_VALID TRUE CACHE BOOL "SuiteSparseSPQR valid")
SET(SUITESPARSE_SPQR_VALID false CACHE BOOL "SuiteSparseSPQR valid") else()
endif() SET(SUITESPARSE_SPQR_VALID false CACHE BOOL "SuiteSparseSPQR valid")
endif()
if(SUITESPARSE_SPQR_VALID)
FIND_LIBRARY( SUITESPARSE_SPQR_LIBRARY if(SUITESPARSE_SPQR_VALID)
NAMES spqr FIND_LIBRARY( SUITESPARSE_SPQR_LIBRARY
PATHS ${SUITESPARSE_LIBRARY_DIR} ) NAMES spqr
IF (SUITESPARSE_SPQR_LIBRARY) PATHS ${SUITESPARSE_LIBRARY_DIR} )
list ( APPEND SUITESPARSE_LIBRARIES spqr) if (SUITESPARSE_SPQR_LIBRARY)
ENDIF (SUITESPARSE_SPQR_LIBRARY) list ( APPEND SUITESPARSE_LIBRARIES spqr)
endif() endif (SUITESPARSE_SPQR_LIBRARY)
endif()
ENDIF( SUITESPARSE_LIBRARY_DIR )
endif( SUITESPARSE_LIBRARY_DIR )
endif( WIN32 ) endif( WIN32 )
IF (SUITESPARSE_INCLUDE_DIRS AND SUITESPARSE_LIBRARIES) if (SUITESPARSE_LIBRARY_DIR AND SUITESPARSE_LIBRARIES)
IF(WIN32) if(WIN32)
list (APPEND SUITESPARSE_INCLUDE_DIRS ${CHOLMOD_INCLUDE_DIR}/../../UFconfig ) list (APPEND SUITESPARSE_INCLUDE_DIRS ${CHOLMOD_INCLUDE_DIR}/../../UFconfig )
ENDIF(WIN32) endif(WIN32)
SET(SUITESPARSE_FOUND TRUE) SET(SUITESPARSE_FOUND TRUE)
ELSE (SUITESPARSE_INCLUDE_DIRS AND SUITESPARSE_LIBRARIES) else (SUITESPARSE_LIBRARY_DIR AND SUITESPARSE_LIBRARIES)
SET( SUITESPARSE_FOUND FALSE ) SET( SUITESPARSE_FOUND FALSE )
ENDIF (SUITESPARSE_INCLUDE_DIRS AND SUITESPARSE_LIBRARIES) endif (SUITESPARSE_LIBRARY_DIR AND SUITESPARSE_LIBRARIES)