Browse Source

Add fallback for finding gmp

pkg-config support was added very recently to gmp, so a lot of platforms
we want to support won't find gmp this way.
tags/v1.12.90
Pierre Ossman 1 year ago
parent
commit
ab8626a54d
1 changed files with 5 additions and 1 deletions
  1. 5
    1
      cmake/Modules/FindGmp.cmake

+ 5
- 1
cmake/Modules/FindGmp.cmake View File

@@ -2,7 +2,11 @@ find_package(PkgConfig)

if (PKG_CONFIG_FOUND)
pkg_check_modules(GMP gmp)
else()
endif()

# Only very recent versions of gmp has pkg-config support, so we have to
# fall back on a more classical search
if(NOT GMP_FOUND)
find_path(GMP_INCLUDE_DIRS NAMES gmp.h PATH_SUFFIXES)
find_library(GMP_LIBRARIES NAMES gmp)
find_package_handle_standard_args(GMP DEFAULT_MSG GMP_LIBRARIES GMP_INCLUDE_DIRS)

Loading…
Cancel
Save