FindARPACK.cmake 1.13 KB
Newer Older
1
2
3
4
5
6
# - Try to find ARPACK
# Once done this will define
#
#  ARPACK_FOUND        - system has ARPACK
#  ARPACK_INCLUDE_DIR  - the ARPACK include directories
#  ARPACK_LIBRARY      - Link this to use ARPACK
7
8
#  ARPACKpp_LIBRARY    - Link this to use ARPACK++
#  ARPACK_LIBRARIES    - Link this to use ARPACK together with ARPACK++
9
10
11
12


find_path (ARPACK_INCLUDE_DIR NAMES arpack++/argeig.h
  HINTS ENV ARPACK_INCLUDE_DIR
13
  PATHS /usr/include/arpack++ $ENV{HOME}/opt/arpack++/include "C:\\libs\\arpack++\\include"
14
15
16
17
18
19
20
  DOC "ARPACK Include Directory")

IF ( WIN32 )
find_library( ARPACK_LIBRARY arpack.lib
              PATHS "C:\\libs\\arpack++\\lib"
            )
ELSE( WIN32 )
21
22
  find_library( ARPACK_LIBRARY arpack
                PATHS /usr/lib /usr/lib64
23
              )
24
25
26
27
28
29
30
31
32
  find_library( ARPACKpp_LIBRARY arpack++
                PATHS /usr/lib /usr/lib64
              )

  list( APPEND ARPACK_LIBRARIES  ${ARPACK_LIBRARY} )
  IF(ARPACKpp_LIBRARY)
    list( APPEND ARPACK_LIBRARIES  ${ARPACKpp_LIBRARY} )
  ENDIF(ARPACKpp_LIBRARY)
  
33
34
35
36
37
38
39
40
41
42
43
ENDIF( WIN32 )

IF (ARPACK_INCLUDE_DIR AND ARPACK_LIBRARY)
  SET(ARPACK_FOUND TRUE)
ELSE ()
  SET(ARPACK_FOUND FALSE)
ENDIF ()