File: FindGMP.cmake

package info (click to toggle)
onak 0.6.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,276 kB
  • sloc: ansic: 13,822; sh: 398; perl: 301; sql: 21; makefile: 19
file content (24 lines) | stat: -rw-r--r-- 848 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# No pkg-config support in GMP, so try and find it manually                              

set(GMP_PREFIX "" CACHE PATH "path ")

find_path(GMP_INCLUDE_DIR gmp.h gmpxx.h
    PATHS ${GMP_PREFIX}/include /usr/include /usr/local/include)                         

find_library(GMP_LIBRARY NAMES gmp libgmp
    PATHS ${GMP_PREFIX}/lib /usr/lib /usr/local/lib)                                     

if(GMP_INCLUDE_DIR AND GMP_LIBRARY)
    get_filename_component(GMP_LIBRARY_DIR ${GMP_LIBRARY} PATH)                          
    set(GMP_FOUND TRUE)
endif()

if(GMP_FOUND)
   if(NOT GMP_FIND_QUIETLY)
      MESSAGE(STATUS "Found GMP: ${GMP_LIBRARY}")                                        
   endif()
elseif(GMP_FOUND)
   if(GMP_FIND_REQUIRED)
      message(FATAL_ERROR "Could not find GMP")                                          
   endif()
endif()