File: FindGMPXX.cmake

package info (click to toggle)
cgal 6.1.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 144,952 kB
  • sloc: cpp: 811,597; ansic: 208,576; sh: 493; python: 411; makefile: 286; javascript: 174
file content (42 lines) | stat: -rw-r--r-- 1,127 bytes parent folder | download | duplicates (2)
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
35
36
37
38
39
40
41
42
# - Try to find the GMPXX libraries
# This module defines:
#   GMPXX_FOUND        - system has GMPXX lib
#   GMPXX_INCLUDE_DIR  - the GMPXX include directory
#   GMPXX_LIBRARIES    - Libraries needed to use GMPXX

# GMPXX needs GMP

find_package( GMP QUIET )

if(GMP_FOUND)

  if (GMPXX_INCLUDE_DIR AND GMPXX_LIBRARIES)
    # Already in cache, be silent
    set(GMPXX_FIND_QUIETLY TRUE)
  endif()

  find_path(GMPXX_INCLUDE_DIR NAMES gmpxx.h
            HINTS ENV GMPXX_INC_DIR
                  ENV GMPXX_DIR
                  ${GMP_INCLUDE_DIR_SEARCH}
            PATH_SUFFIXES include
            DOC "The directory containing the GMPXX include files"
           )

  find_library(GMPXX_LIBRARIES NAMES gmpxx
               HINTS ENV GMPXX_LIB_DIR
                     ENV GMPXX_DIR
                     ${GMP_LIBRARIES_DIR_SEARCH}
               PATH_SUFFIXES lib
               DOC "Path to the GMPXX library"
               )

  include(FindPackageHandleStandardArgs)

  find_package_handle_standard_args(GMPXX "DEFAULT_MSG" GMPXX_LIBRARIES GMPXX_INCLUDE_DIR )

else()

  message( FATAL_ERROR "GMPXX needs GMP")

endif()