diff options
author | Pierre Ossman <ossman@cendio.se> | 2022-09-01 11:28:23 +0200 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2022-09-01 14:35:39 +0200 |
commit | 7b32549083bc41ceca0de55036b597e7ad3a4cd3 (patch) | |
tree | 3a9a451f3f18ce37dbb72eac74aa453c9c56bd1d /cmake/Modules | |
parent | 4b12f80cf453d3ff2df27f5a282d0dd57c99feaa (diff) | |
download | tigervnc-7b32549083bc41ceca0de55036b597e7ad3a4cd3.tar.gz tigervnc-7b32549083bc41ceca0de55036b597e7ad3a4cd3.zip |
Split gmp detection to separate module
It is a (weird) dependency of nettle, and not part of nettle itself. So
split it to a separate module for clarity.
Diffstat (limited to 'cmake/Modules')
-rw-r--r-- | cmake/Modules/FindGmp.cmake | 9 | ||||
-rw-r--r-- | cmake/Modules/FindNettle.cmake | 5 |
2 files changed, 10 insertions, 4 deletions
diff --git a/cmake/Modules/FindGmp.cmake b/cmake/Modules/FindGmp.cmake new file mode 100644 index 00000000..c59f2219 --- /dev/null +++ b/cmake/Modules/FindGmp.cmake @@ -0,0 +1,9 @@ +find_package(PkgConfig) + +if (PKG_CONFIG_FOUND) + pkg_check_modules(GMP gmp) +else() + 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) +endif() diff --git a/cmake/Modules/FindNettle.cmake b/cmake/Modules/FindNettle.cmake index cd9b424a..e2283c49 100644 --- a/cmake/Modules/FindNettle.cmake +++ b/cmake/Modules/FindNettle.cmake @@ -1,16 +1,13 @@ +find_package(Gmp) find_package(PkgConfig) if (PKG_CONFIG_FOUND) pkg_check_modules(NETTLE nettle>=3.0) pkg_check_modules(HOGWEED hogweed) - pkg_check_modules(GMP gmp) else() find_path(NETTLE_INCLUDE_DIRS NAMES eax.h PATH_SUFFIXES nettle) find_library(NETTLE_LIBRARIES NAMES nettle) find_package_handle_standard_args(NETTLE DEFAULT_MSG NETTLE_LIBRARIES NETTLE_INCLUDE_DIRS) - 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) find_library(HOGWEED_LIBRARIES NAMES hogweed) find_package_handle_standard_args(HOGWEED DEFAULT_MSG HOGWEED_LIBRARIES) endif() |