Commit 4c22281b authored by Jan Möbius's avatar Jan Möbius

Suitesparse and Metis finder update for vs2013 versions

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@19930 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 6a3f63f4
...@@ -10,6 +10,38 @@ if (METIS_INCLUDE_DIR) ...@@ -10,6 +10,38 @@ if (METIS_INCLUDE_DIR)
SET(METIS_FIND_QUIETLY TRUE) SET(METIS_FIND_QUIETLY TRUE)
endif (METIS_INCLUDE_DIR) endif (METIS_INCLUDE_DIR)
if ( WIN32 )
if ( CMAKE_GENERATOR MATCHES ".*Win64" )
SET( DIRSUFFIX "lib64" )
else ()
SET( DIRSUFFIX "lib" )
endif()
if ( CMAKE_GENERATOR MATCHES "^Visual Studio 10.*" )
SET(VS_SEARCH_PATH "c:/libs/vs2010/x32/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 11.*Win64" )
SET(VS_SEARCH_PATH "c:/libs/vs2012/x64/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 11.*" )
SET(VS_SEARCH_PATH "c:/libs/vs2012/x32/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 12.*Win64" )
SET(VS_SEARCH_PATH "c:/libs/vs2013/x64/")
elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 12.*" )
SET(VS_SEARCH_PATH "c:/libs/vs2013/x32/")
endif()
find_path(METIS_INCLUDE_DIR NAMES metis.h
PATHS "$ENV{IPOPT_HOME}/ThirdParty/Metis/metis-4.0/Lib/"
"${VS_SEARCH_PATH}suitesparse-metis-for-windows-1.2.2-install/include/"
)
find_library( METIS_LIBRARY
metis metis
PATHS "${VS_SEARCH_PATH}suitesparse-metis-for-windows-1.2.2-install/${DIRSUFFIX}" )
else(WIN32)
find_path(METIS_INCLUDE_DIR NAMES metis.h find_path(METIS_INCLUDE_DIR NAMES metis.h
PATHS "$ENV{IPOPT_HOME}/ThirdParty/Metis/metis-4.0/Lib/" PATHS "$ENV{IPOPT_HOME}/ThirdParty/Metis/metis-4.0/Lib/"
"/usr/include/" "/usr/include/"
...@@ -25,6 +57,8 @@ find_library( METIS_LIBRARY ...@@ -25,6 +57,8 @@ find_library( METIS_LIBRARY
PATHS "$ENV{IPOPT_HOME}/lib/" PATHS "$ENV{IPOPT_HOME}/lib/"
"/usr/lib" "/usr/lib"
"/opt/local/lib" ) "/opt/local/lib" )
endif()
set(METIS_INCLUDE_DIRS "${METIS_INCLUDE_DIR}" ) set(METIS_INCLUDE_DIRS "${METIS_INCLUDE_DIR}" )
set(METIS_LIBRARIES "${METIS_LIBRARY}" ) set(METIS_LIBRARIES "${METIS_LIBRARY}" )
......
...@@ -58,6 +58,22 @@ if( WIN32 ) ...@@ -58,6 +58,22 @@ if( WIN32 )
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")
SET(SUITESPARSE_SPQR_VALID TRUE CACHE BOOL "SuiteSparseSPQR valid")
else()
SET(SUITESPARSE_SPQR_VALID FALSE CACHE BOOL "SuiteSparseSPQR valid")
endif()
if(SUITESPARSE_SPQR_VALID)
FIND_LIBRARY( SUITESPARSE_SPQR_LIBRARY
NAMES libspqr
PATHS ${SUITESPARSE_LIBRARY_DIRS} )
IF (SUITESPARSE_SPQR_LIBRARY)
list ( APPEND SUITESPARSE_LIBRARIES optimized;libspqr;debug;libspqrd)
ENDIF (SUITESPARSE_SPQR_LIBRARY)
endif()
ENDIF( SUITESPARSE_LIBRARY_DIRS ) ENDIF( SUITESPARSE_LIBRARY_DIRS )
else( WIN32 ) else( 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