Commit c936b714 authored by Jan Möbius's avatar Jan Möbius

dos2unix



git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@6481 383ad7c9-94d9-4d36-a494-682f7c89f535
parent fe993d10
# - Find CGAL
# Find the CGAL autolinking headers.
#
# CGAL_INCLUDE_DIR - where to find CGAL.h, etc.
# CGAL_FOUND - True if CGAL found.
IF (CGAL_INCLUDE_DIR)
# Already in cache, be silent
SET(CGAL_FIND_QUIETLY TRUE)
ENDIF (CGAL_INCLUDE_DIR)
GET_FILENAME_COMPONENT(module_file_path ${CMAKE_CURRENT_LIST_FILE} PATH )
IF (NOT APPLE )
# Look for the header file.
FIND_PATH(CGAL_INCLUDE_DIR NAMES CGAL/auto_link/auto_link.h
PATHS ../../External/include
"C:/Program Files/CGAL-3.4/include"
"C:/Programme/CGAL-3.4/include"
"C:/libs/CGAL-3.4/include"
${module_file_path}/../../../External/include)
ELSE( NOT APPLE)
# Look for the header file.
FIND_PATH(CGAL_INCLUDE_DIR NAMES CGAL/auto_link/auto_link.h
PATHS "${CMAKE_SOURCE_DIR}/MacOS/Libs/CGAL-3.4/include"
)
ENDIF( NOT APPLE )
MARK_AS_ADVANCED(CGAL_INCLUDE_DIR)
# Copy the results to the output variables.
IF(CGAL_INCLUDE_DIR )
SET(CGAL_FOUND 1)
SET(CGAL_INCLUDE_DIR ${CGAL_INCLUDE_DIR})
# Look for the taucs dir.
FIND_PATH(CGAL_TAUCS_DIR NAMES include/taucs.h
PATHS ${CGAL_INCLUDE_DIR}/../auxiliary/taucs)
IF(WIN32)
include(CGAL_GeneratorSpecificSettings)
find_path(CGAL_LIBRARY_DIR
NAMES "CGAL-${CGAL_TOOLSET}-mt.lib" "CGAL-${CGAL_TOOLSET}-mt-gd.lib"
PATHS "${CGAL_INCLUDE_DIR}/../lib"
DOC "Directory containing the CGAL library"
)
ENDIF(WIN32)
add_definitions (-DCGAL_AUTOLINK)
ELSE(CGAL_INCLUDE_DIR )
SET(CGAL_FOUND 0)
SET(CGAL_INCLUDE_DIR)
ENDIF(CGAL_INCLUDE_DIR )
# Report the results.
IF(NOT CGAL_FOUND)
SET(CGAL_DIR_MESSAGE
"CGAL was not found. Make sure CGAL_INCLUDE_DIR is set to the directories containing the include files for CGAL. .")
IF(CGAL_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "${CGAL_DIR_MESSAGE}")
ELSEIF(NOT CGAL_FIND_QUIETLY)
MESSAGE(STATUS "${CGAL_DIR_MESSAGE}")
ELSE(NOT CGAL_FIND_QUIETLY)
ENDIF(CGAL_FIND_REQUIRED)
ELSE (NOT CGAL_FOUND)
IF(NOT CGAL_FIND_QUIETLY)
MESSAGE(STATUS "Looking for CGAL - found")
ENDIF(NOT CGAL_FIND_QUIETLY)
ENDIF(NOT CGAL_FOUND)
# - Find CGAL
# Find the CGAL autolinking headers.
#
# CGAL_INCLUDE_DIR - where to find CGAL.h, etc.
# CGAL_FOUND - True if CGAL found.
IF (CGAL_INCLUDE_DIR)
# Already in cache, be silent
SET(CGAL_FIND_QUIETLY TRUE)
ENDIF (CGAL_INCLUDE_DIR)
GET_FILENAME_COMPONENT(module_file_path ${CMAKE_CURRENT_LIST_FILE} PATH )
IF (NOT APPLE )
# Look for the header file.
FIND_PATH(CGAL_INCLUDE_DIR NAMES CGAL/auto_link/auto_link.h
PATHS ../../External/include
"C:/Program Files/CGAL-3.4/include"
"C:/Programme/CGAL-3.4/include"
"C:/libs/CGAL-3.4/include"
${module_file_path}/../../../External/include)
ELSE( NOT APPLE)
# Look for the header file.
FIND_PATH(CGAL_INCLUDE_DIR NAMES CGAL/auto_link/auto_link.h
PATHS "${CMAKE_SOURCE_DIR}/MacOS/Libs/CGAL-3.4/include"
)
ENDIF( NOT APPLE )
MARK_AS_ADVANCED(CGAL_INCLUDE_DIR)
# Copy the results to the output variables.
IF(CGAL_INCLUDE_DIR )
SET(CGAL_FOUND 1)
SET(CGAL_INCLUDE_DIR ${CGAL_INCLUDE_DIR})
# Look for the taucs dir.
FIND_PATH(CGAL_TAUCS_DIR NAMES include/taucs.h
PATHS ${CGAL_INCLUDE_DIR}/../auxiliary/taucs)
IF(WIN32)
include(CGAL_GeneratorSpecificSettings)
find_path(CGAL_LIBRARY_DIR
NAMES "CGAL-${CGAL_TOOLSET}-mt.lib" "CGAL-${CGAL_TOOLSET}-mt-gd.lib"
PATHS "${CGAL_INCLUDE_DIR}/../lib"
DOC "Directory containing the CGAL library"
)
ENDIF(WIN32)
add_definitions (-DCGAL_AUTOLINK)
ELSE(CGAL_INCLUDE_DIR )
SET(CGAL_FOUND 0)
SET(CGAL_INCLUDE_DIR)
ENDIF(CGAL_INCLUDE_DIR )
# Report the results.
IF(NOT CGAL_FOUND)
SET(CGAL_DIR_MESSAGE
"CGAL was not found. Make sure CGAL_INCLUDE_DIR is set to the directories containing the include files for CGAL. .")
IF(CGAL_FIND_REQUIRED)
MESSAGE(FATAL_ERROR "${CGAL_DIR_MESSAGE}")
ELSEIF(NOT CGAL_FIND_QUIETLY)
MESSAGE(STATUS "${CGAL_DIR_MESSAGE}")
ELSE(NOT CGAL_FIND_QUIETLY)
ENDIF(CGAL_FIND_REQUIRED)
ELSE (NOT CGAL_FOUND)
IF(NOT CGAL_FIND_QUIETLY)
MESSAGE(STATUS "Looking for CGAL - found")
ENDIF(NOT CGAL_FIND_QUIETLY)
ENDIF(NOT CGAL_FOUND)
# Try to find the GMP libraries
# GMP_FOUND - system has GMP lib
# GMP_INCLUDE_DIR - the GMP include directory
# GMP_LIBRARY_DIR - Directory where the GMP libraries are located
# GMP_LIBRARIES - the GMP libraries
# GMP_IN_CGAL_AUXILIARY - TRUE if the GMP found is the one distributed with CGAL in the auxiliary folder
# TODO: support MacOSX
include(CGAL_FindPackageHandleStandardArgs)
include(CGAL_GeneratorSpecificSettings)
# Is it already configured?
if (GMP_INCLUDE_DIR AND GMP_LIBRARY_DIR )
set(GMP_FOUND TRUE)
else()
find_package(CGAL)
if (NOT CGAL_FOUND)
message(FATAL_ERROR "CGAL not found .. required to use taucs!")
endif()
find_path(GMP_INCLUDE_DIR
NAMES gmp.h
PATHS "${CGAL_INCLUDE_DIR}/../auxiliary/gmp/include"
DOC "The directory containing the GMP header files"
)
if ( GMP_INCLUDE_DIR STREQUAL "${CMAKE_SOURCE_DIR}/auxiliary/gmp/include" )
cache_set( GMP_IN_CGAL_AUXILIARY TRUE )
endif()
if ( CGAL_AUTO_LINK_ENABLED )
find_path(GMP_LIBRARY_DIR
NAMES "gmp-${CGAL_TOOLSET}-mt.lib" "gmp-${CGAL_TOOLSET}-mt-gd.lib"
PATHS "${CGAL_INCLUDE_DIR}/../auxiliary/gmp/lib"
DOC "Directory containing the GMP library"
)
else()
find_library(GMP_LIBRARIES NAMES gmp
PATHS ENV GMP_LIB_DIR
DOC "Path to the GMP library"
)
if ( GMP_LIBRARIES )
get_filename_component(GMP_LIBRARY_DIR ${GMP_LIBRARIES} PATH CACHE )
endif()
endif()
# Attempt to load a user-defined configuration for GMP if couldn't be found
if ( NOT GMP_INCLUDE_DIR OR NOT GMP_LIBRARY_DIR )
include( GMPConfig OPTIONAL )
endif()
find_package_handle_standard_args(GMP "DEFAULT_MSG" GMP_INCLUDE_DIR GMP_LIBRARY_DIR)
endif()
# Try to find the GMP libraries
# GMP_FOUND - system has GMP lib
# GMP_INCLUDE_DIR - the GMP include directory
# GMP_LIBRARY_DIR - Directory where the GMP libraries are located
# GMP_LIBRARIES - the GMP libraries
# GMP_IN_CGAL_AUXILIARY - TRUE if the GMP found is the one distributed with CGAL in the auxiliary folder
# TODO: support MacOSX
include(CGAL_FindPackageHandleStandardArgs)
include(CGAL_GeneratorSpecificSettings)
# Is it already configured?
if (GMP_INCLUDE_DIR AND GMP_LIBRARY_DIR )
set(GMP_FOUND TRUE)
else()
find_package(CGAL)
if (NOT CGAL_FOUND)
message(FATAL_ERROR "CGAL not found .. required to use taucs!")
endif()
find_path(GMP_INCLUDE_DIR
NAMES gmp.h
PATHS "${CGAL_INCLUDE_DIR}/../auxiliary/gmp/include"
DOC "The directory containing the GMP header files"
)
if ( GMP_INCLUDE_DIR STREQUAL "${CMAKE_SOURCE_DIR}/auxiliary/gmp/include" )
cache_set( GMP_IN_CGAL_AUXILIARY TRUE )
endif()
if ( CGAL_AUTO_LINK_ENABLED )
find_path(GMP_LIBRARY_DIR
NAMES "gmp-${CGAL_TOOLSET}-mt.lib" "gmp-${CGAL_TOOLSET}-mt-gd.lib"
PATHS "${CGAL_INCLUDE_DIR}/../auxiliary/gmp/lib"
DOC "Directory containing the GMP library"
)
else()
find_library(GMP_LIBRARIES NAMES gmp
PATHS ENV GMP_LIB_DIR
DOC "Path to the GMP library"
)
if ( GMP_LIBRARIES )
get_filename_component(GMP_LIBRARY_DIR ${GMP_LIBRARIES} PATH CACHE )
endif()
endif()
# Attempt to load a user-defined configuration for GMP if couldn't be found
if ( NOT GMP_INCLUDE_DIR OR NOT GMP_LIBRARY_DIR )
include( GMPConfig OPTIONAL )
endif()
find_package_handle_standard_args(GMP "DEFAULT_MSG" GMP_INCLUDE_DIR GMP_LIBRARY_DIR)
endif()
# - Try to find PHYSIM
# Once done this will define
#
# PHYSIM_FOUND - system has PHYSIM
# PHYSIM_INCLUDE_DIR - the PHYSIM include directory
# PHYSIM_LIBRARY_DIR - where the libraries are
# PHYSIM_LIBRARY - Link these to use PHYSIM
#
IF (PHYSIM_INCLUDE_DIR)
# Already in cache, be silent
SET(PHYSIM_FIND_QUIETLY TRUE)
ENDIF (PHYSIM_INCLUDE_DIR)
FIND_PATH( PHYSIM_INCLUDE_DIR Config/PhySimDefines.hh
PATHS "${CMAKE_SOURCE_DIR}/PhySim" )
add_definitions (-DPHYSIMDLL -DUSEPHYSIM )
IF (PHYSIM_INCLUDE_DIR)
SET(PHYSIM_FOUND TRUE)
SET( PHYSIM_LIBRARY_DIR "${ACG_PROJECT_LIBDIR}" )
SET( PHYSIM_LIBRARY "PhySim")
ELSE (PHYSIM_INCLUDE_DIR)
SET( PHYSIM_FOUND FALSE )
SET( PHYSIM_LIBRARY_DIR )
ENDIF (PHYSIM_INCLUDE_DIR)
# - Try to find PHYSIM
# Once done this will define
#
# PHYSIM_FOUND - system has PHYSIM
# PHYSIM_INCLUDE_DIR - the PHYSIM include directory
# PHYSIM_LIBRARY_DIR - where the libraries are
# PHYSIM_LIBRARY - Link these to use PHYSIM
#
IF (PHYSIM_INCLUDE_DIR)
# Already in cache, be silent
SET(PHYSIM_FIND_QUIETLY TRUE)
ENDIF (PHYSIM_INCLUDE_DIR)
FIND_PATH( PHYSIM_INCLUDE_DIR Config/PhySimDefines.hh
PATHS "${CMAKE_SOURCE_DIR}/PhySim" )
add_definitions (-DPHYSIMDLL -DUSEPHYSIM )
IF (PHYSIM_INCLUDE_DIR)
SET(PHYSIM_FOUND TRUE)
SET( PHYSIM_LIBRARY_DIR "${ACG_PROJECT_LIBDIR}" )
SET( PHYSIM_LIBRARY "PhySim")
ELSE (PHYSIM_INCLUDE_DIR)
SET( PHYSIM_FOUND FALSE )
SET( PHYSIM_LIBRARY_DIR )
ENDIF (PHYSIM_INCLUDE_DIR)
This diff is collapsed.
# - Try to find SLEPC
# Once done this will define
#
# SLEPC_FOUND - system has SLEPSc
# SLEPC_INCLUDE_DIR - the SLEPSc include directories
# SLEPC_LIBRARY - Link this to use SLEPSc
FIND_PACKAGE(PETSC)
find_path (SLEPC_INCLUDE_DIR slepc.h
HINTS ENV SLEPC_INCLUDE_DIR
PATHS /usr/lib/slepcdir/3.0.0/include "C:\\libs\\slepc-3.0.0-p4\\include"
DOC "SLEPC Include Directory")
IF ( WIN32 )
find_library( SLEPC_LIBRARY libslepc.lib
PATHS "C:\\libs\\slepc-3.0.0-p4\\cygwin-c-opt\\lib"
)
ELSE( WIN32 )
find_library( SLEPC_LIBRARY slepc
PATHS /usr/lib
)
ENDIF( WIN32 )
IF (SLEPC_INCLUDE_DIR AND SLEPC_LIBRARY)
SET(SLEPC_FOUND TRUE)
ELSE ()
SET(SLEPC_FOUND FALSE)
ENDIF ()
# - Try to find SLEPC
# Once done this will define
#
# SLEPC_FOUND - system has SLEPSc
# SLEPC_INCLUDE_DIR - the SLEPSc include directories
# SLEPC_LIBRARY - Link this to use SLEPSc
FIND_PACKAGE(PETSC)
find_path (SLEPC_INCLUDE_DIR slepc.h
HINTS ENV SLEPC_INCLUDE_DIR
PATHS /usr/lib/slepcdir/3.0.0/include "C:\\libs\\slepc-3.0.0-p4\\include"
DOC "SLEPC Include Directory")
IF ( WIN32 )
find_library( SLEPC_LIBRARY libslepc.lib
PATHS "C:\\libs\\slepc-3.0.0-p4\\cygwin-c-opt\\lib"
)
ELSE( WIN32 )
find_library( SLEPC_LIBRARY slepc
PATHS /usr/lib
)
ENDIF( WIN32 )
IF (SLEPC_INCLUDE_DIR AND SLEPC_LIBRARY)
SET(SLEPC_FOUND TRUE)
ELSE ()
SET(SLEPC_FOUND FALSE)
ENDIF ()
# - Try to find SUITESPARSE
# Once done this will define
#
# SUITESPARSE_FOUND - system has SUITESPARSE
# SUITESPARSE_INCLUDE_DIRS - the SUITESPARSE include directory
# SUITESPARSE_LIBRARIES - Link these to use SUITESPARSE
# SUITESPARSE_LIBRARY_DIR - Library directory containing suitesparse libs
#
IF (SUITESPARSE_INCLUDE_DIRS)
# Already in cache, be silent
SET(SUITESPARSE_FIND_QUIETLY TRUE)
ENDIF (SUITESPARSE_INCLUDE_DIRS)
if( WIN32 )
# Find cholmod part of the suitesparse library collection
FIND_PATH( CHOLMOD_INCLUDE_DIR cholmod.h
PATHS "C:\\libs\\SuiteSparse\\CHOLMOD\\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" )
# if we found the library, add it to the defined libraries
IF ( SUITESPARSE_LIBRARY_DIRS )
list ( APPEND SUITESPARSE_LIBRARIES suitesparse )
ENDIF( SUITESPARSE_LIBRARY_DIRS )
else( WIN32 )
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 )
# if we found the library, add it to the defined libraries
IF ( SUITESPARSE_LIBRARY_DIR )
list ( APPEND SUITESPARSE_LIBRARY_DIRS ${SUITESPARSE_LIBRARY_DIR} )
FIND_LIBRARY( CHOLMOD_LIBRARY
NAMES cholmod CHOLMOD
PATHS ${SUITESPARSE_LIBRARY_DIR} )
list ( APPEND SUITESPARSE_LIBRARIES ${CHOLMOD_LIBRARY} )
ENDIF( SUITESPARSE_LIBRARY_DIR )
endif( WIN32 )
IF (SUITESPARSE_INCLUDE_DIRS AND SUITESPARSE_LIBRARIES)
IF(WIN32)
list (APPEND SUITESPARSE_INCLUDE_DIRS ${CHOLMOD_INCLUDE_DIR}/../../UFconfig )
ENDIF(WIN32)
SET(SUITESPARSE_FOUND TRUE)
ELSE (SUITESPARSE_INCLUDE_DIRS AND SUITESPARSE_LIBRARIES)
SET( SUITESPARSE_FOUND FALSE )
ENDIF (SUITESPARSE_INCLUDE_DIRS AND SUITESPARSE_LIBRARIES)
# - Try to find SUITESPARSE
# Once done this will define
#
# SUITESPARSE_FOUND - system has SUITESPARSE
# SUITESPARSE_INCLUDE_DIRS - the SUITESPARSE include directory
# SUITESPARSE_LIBRARIES - Link these to use SUITESPARSE
# SUITESPARSE_LIBRARY_DIR - Library directory containing suitesparse libs
#
IF (SUITESPARSE_INCLUDE_DIRS)
# Already in cache, be silent
SET(SUITESPARSE_FIND_QUIETLY TRUE)
ENDIF (SUITESPARSE_INCLUDE_DIRS)
if( WIN32 )
# Find cholmod part of the suitesparse library collection
FIND_PATH( CHOLMOD_INCLUDE_DIR cholmod.h
PATHS "C:\\libs\\SuiteSparse\\CHOLMOD\\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" )
# if we found the library, add it to the defined libraries
IF ( SUITESPARSE_LIBRARY_DIRS )
list ( APPEND SUITESPARSE_LIBRARIES suitesparse )
ENDIF( SUITESPARSE_LIBRARY_DIRS )
else( WIN32 )
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 )
# if we found the library, add it to the defined libraries
IF ( SUITESPARSE_LIBRARY_DIR )
list ( APPEND SUITESPARSE_LIBRARY_DIRS ${SUITESPARSE_LIBRARY_DIR} )
FIND_LIBRARY( CHOLMOD_LIBRARY
NAMES cholmod CHOLMOD
PATHS ${SUITESPARSE_LIBRARY_DIR} )
list ( APPEND SUITESPARSE_LIBRARIES ${CHOLMOD_LIBRARY} )
ENDIF( SUITESPARSE_LIBRARY_DIR )
endif( WIN32 )
IF (SUITESPARSE_INCLUDE_DIRS AND SUITESPARSE_LIBRARIES)
IF(WIN32)
list (APPEND SUITESPARSE_INCLUDE_DIRS ${CHOLMOD_INCLUDE_DIR}/../../UFconfig )
ENDIF(WIN32)
SET(SUITESPARSE_FOUND TRUE)
ELSE (SUITESPARSE_INCLUDE_DIRS AND SUITESPARSE_LIBRARIES)
SET( SUITESPARSE_FOUND FALSE )
ENDIF (SUITESPARSE_INCLUDE_DIRS AND SUITESPARSE_LIBRARIES)
if (SUPERLU_INCLUDE_DIR)
# in cache already
set(SUPERLU_FOUND TRUE)
else (SUPERLU_INCLUDE_DIR)
if (WIN32)
find_path(SUPERLU_INCLUDE_DIR NAMES supermatrix.h
PREFIXES SRC
PATHS
"C:\\libs\\SuperLU_3.0"
${SUPERLU_INCLUDE_PATH}
)
find_library( SUPERLU_LIBRARY
SuperLU
PATHS "C:\\libs\\SuperLU_3.0\\lib" )
ELSEIF(APPLE)
find_path(SUPERLU_INCLUDE_DIR NAMES supermatrix.h
PATHS "${CMAKE_SOURCE_DIR}/MacOS/Libs/SuperLU_3.0/SuperLU"
${SUPERLU_INCLUDE_PATH}
)
find_library( SUPERLU_LIBRARY
superlu
PATHS "${CMAKE_SOURCE_DIR}/MacOS/Libs/SuperLU_3.0/SuperLU")
ELSE( WIN32 )
find_path(SUPERLU_INCLUDE_DIR NAMES supermatrix.h
PATHS /usr/include/superlu
${SUPERLU_INCLUDE_PATH}
)
find_library( SUPERLU_LIBRARY
superlu
PATHS /usr/lib )
ENDIF()
include(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(SUPERLU DEFAULT_MSG SUPERLU_INCLUDE_DIR )
endif(SUPERLU_INCLUDE_DIR)
if (SUPERLU_INCLUDE_DIR)
# in cache already
set(SUPERLU_FOUND TRUE)
else (SUPERLU_INCLUDE_DIR)
if (WIN32)
find_path(SUPERLU_INCLUDE_DIR NAMES supermatrix.h
PREFIXES SRC
PATHS
"C:\\libs\\SuperLU_3.0"
${SUPERLU_INCLUDE_PATH}
)
find_library( SUPERLU_LIBRARY
SuperLU
PATHS "C:\\libs\\SuperLU_3.0\\lib" )
ELSEIF(APPLE)
find_path(SUPERLU_INCLUDE_DIR NAMES supermatrix.h
PATHS "${CMAKE_SOURCE_DIR}/MacOS/Libs/SuperLU_3.0/SuperLU"
${SUPERLU_INCLUDE_PATH}
)
find_library( SUPERLU_LIBRARY
superlu
PATHS "${CMAKE_SOURCE_DIR}/MacOS/Libs/SuperLU_3.0/SuperLU")
ELSE( WIN32 )
find_path(SUPERLU_INCLUDE_DIR NAMES supermatrix.h
PATHS /usr/include/superlu
${SUPERLU_INCLUDE_PATH}
)