FindSLEPC.cmake 833 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34
# - 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  /opt/local/lib/petsc/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
                      /opt/local/lib/petsc/lib 
              )
ENDIF( WIN32 )

IF (SLEPC_INCLUDE_DIR AND SLEPC_LIBRARY)
  SET(SLEPC_FOUND TRUE)
ELSE ()
  SET(SLEPC_FOUND FALSE)
ENDIF ()