Commit 309e5f4e authored by Henrik Zimmer's avatar Henrik Zimmer
Browse files

Updated FindSUITESPARSE, should work better on MacOSx systems

git-svn-id: http://www.openflipper.org/svnrepo/CoMISo/trunk@45 1355f012-dd97-4b2f-ae87-10fa9f823a57
parent ee90c7ed
......@@ -16,38 +16,53 @@ if( WIN32 )
# Find cholmod part of the suitesparse library collection
FIND_PATH( CHOLMOD_INCLUDE_DIR cholmod.h
PATHS "C:\\libs\\SuiteSparse\\CHOLMOD\\Include" )
PATHS "C:\\libs\\win32\\SuiteSparse\\Include" )
# Add cholmod include directory to collection include directories
IF ( CHOLMOD_INCLUDE_DIR )
list ( APPEND SUITESPARSE_INCLUDE_DIRS ${CHOLMOD_INCLUDE_DIR} )
ENDIF( CHOLMOD_INCLUDE_DIR )
# find path suitesparse library
FIND_PATH( SUITESPARSE_LIBRARY_DIRS
suitesparse.lib
PATHS "C:\\libs\\SuiteSparse\\libs" )
amd.lib
PATHS "C:\\libs\\win32\\SuiteSparse\\libs" )
# if we found the library, add it to the defined libraries
IF ( SUITESPARSE_LIBRARY_DIRS )
list ( APPEND SUITESPARSE_LIBRARIES suitesparse )
list ( APPEND SUITESPARSE_LIBRARIES optimized;amd;optimized;camd;optimized;ccolamd;optimized;cholmod;optimized;colamd;optimized;metis;debug;amdd;debug;camdd;debug;ccolamdd;debug;cholmodd;debug;colamdd;debug;metisd;optimized;blas;optimized;libf2c;optimized;lapack;debug;blasd;debug;libf2cd;debug;lapackd )
ENDIF( SUITESPARSE_LIBRARY_DIRS )
else( WIN32 )
FIND_PATH( CHOLMOD_INCLUDE_DIR cholmod.h
PATHS /usr/local/include /usr/include /usr/include/suitesparse/
PATH_SUFFIXES cholmod/ CHOLMOD/ )
IF( APPLE)
FIND_PATH( CHOLMOD_INCLUDE_DIR cholmod.h
PATHS /opt/local/include/ufsparse )
FIND_PATH( SUITESPARSE_LIBRARY_DIR
NAMES libcholmod.a
PATHS /opt/local/lib )
ELSE(APPLE)
FIND_PATH( CHOLMOD_INCLUDE_DIR cholmod.h
PATHS /usr/local/include /usr/include /usr/include/suitesparse/ ${CMAKE_SOURCE_DIR}/MacOS/Libs/cholmod
PATH_SUFFIXES cholmod/ CHOLMOD/ )
FIND_PATH( SUITESPARSE_LIBRARY_DIR
NAMES libcholmod.so
PATHS /usr/lib /usr/local/lib )
ENDIF(APPLE)
# Add cholmod include directory to collection include directories
IF ( CHOLMOD_INCLUDE_DIR )
list ( APPEND SUITESPARSE_INCLUDE_DIRS ${CHOLMOD_INCLUDE_DIR} )
ENDIF( CHOLMOD_INCLUDE_DIR )
FIND_PATH( SUITESPARSE_LIBRARY_DIR
NAMES libcholmod.so
PATHS /usr/lib /usr/local/lib )
# if we found the library, add it to the defined libraries
IF ( SUITESPARSE_LIBRARY_DIR )
......@@ -55,7 +70,27 @@ else( WIN32 )
FIND_LIBRARY( CHOLMOD_LIBRARY
NAMES cholmod CHOLMOD
PATHS ${SUITESPARSE_LIBRARY_DIR} )
list ( APPEND SUITESPARSE_LIBRARIES ${CHOLMOD_LIBRARY} )
FIND_LIBRARY( UMFPACK_LIBRARY
NAMES umfpack UMFPACK
PATHS ${SUITESPARSE_LIBRARY_DIR} )
IF(APPLE)
list ( APPEND SUITESPARSE_LIBRARIES ${SUITESPARSE_LIBRARY_DIR}/libamd.a
${SUITESPARSE_LIBRARY_DIR}/libbtf.a
${SUITESPARSE_LIBRARY_DIR}/libcamd.a
${SUITESPARSE_LIBRARY_DIR}/libccolamd.a
${SUITESPARSE_LIBRARY_DIR}/libcolamd.a
${SUITESPARSE_LIBRARY_DIR}/libcsparse.a
${SUITESPARSE_LIBRARY_DIR}/libcxsparse.a
${SUITESPARSE_LIBRARY_DIR}/libklu.a
${SUITESPARSE_LIBRARY_DIR}/libspqr.a
${SUITESPARSE_LIBRARY_DIR}/libumfpack.a
${SUITESPARSE_LIBRARY_DIR}/libmetis.a
)
ENDIF(APPLE)
list ( APPEND SUITESPARSE_LIBRARIES ${CHOLMOD_LIBRARY} ${UMFPACK_LIBRARY} )
ENDIF( SUITESPARSE_LIBRARY_DIR )
endif( WIN32 )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment