aboutsummaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorPierre Ossman <ossman@cendio.se>2023-04-17 15:55:17 +0200
committerPierre Ossman <ossman@cendio.se>2023-04-17 15:55:17 +0200
commit787987ef863961cbf8017f86771a2438f6500ad5 (patch)
tree6e9a301be9588c511b7e6ae3c131ccd2ecd31198 /cmake
parent640c5503c1b74d518a34bbce0fb7392876e8fb6d (diff)
downloadtigervnc-787987ef863961cbf8017f86771a2438f6500ad5.tar.gz
tigervnc-787987ef863961cbf8017f86771a2438f6500ad5.zip
Handle REQUIRED in our CMake "find" modules
These are expected to abort if they fail to find the relevant software and "REQUIRED" is specified.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Modules/FindFfmpeg.cmake5
-rw-r--r--cmake/Modules/FindGmp.cmake4
-rw-r--r--cmake/Modules/FindNettle.cmake4
-rw-r--r--cmake/Modules/FindPixman.cmake4
4 files changed, 17 insertions, 0 deletions
diff --git a/cmake/Modules/FindFfmpeg.cmake b/cmake/Modules/FindFfmpeg.cmake
index cf09fa4a..1a082449 100644
--- a/cmake/Modules/FindFfmpeg.cmake
+++ b/cmake/Modules/FindFfmpeg.cmake
@@ -15,3 +15,8 @@ else()
find_library(SWSCALE_LIBRARIES NAMES swscale)
find_package_handle_standard_args(SWSCALE DEFAULT_MSG SWSCALE_LIBRARIES SWSCALE_INCLUDE_DIRS)
endif()
+
+if(Ffmpeg_FIND_REQUIRED AND
+ (NOT AVCODEC_FOUND OR NOT AVUTIL_FOUND OR NOT SWSCALE_FOUND))
+ message(FATAL_ERROR "Could not find FFMPEG")
+endif()
diff --git a/cmake/Modules/FindGmp.cmake b/cmake/Modules/FindGmp.cmake
index d0ccd3cd..8711d68e 100644
--- a/cmake/Modules/FindGmp.cmake
+++ b/cmake/Modules/FindGmp.cmake
@@ -11,3 +11,7 @@ if(NOT GMP_FOUND)
find_library(GMP_LIBRARIES NAMES gmp)
find_package_handle_standard_args(GMP DEFAULT_MSG GMP_LIBRARIES GMP_INCLUDE_DIRS)
endif()
+
+if(Gmp_FIND_REQUIRED AND NOT GMP_FOUND)
+ message(FATAL_ERROR "Could not find GMP")
+endif()
diff --git a/cmake/Modules/FindNettle.cmake b/cmake/Modules/FindNettle.cmake
index e2283c49..f5acf6ac 100644
--- a/cmake/Modules/FindNettle.cmake
+++ b/cmake/Modules/FindNettle.cmake
@@ -15,3 +15,7 @@ endif()
if (NOT HOGWEED_FOUND OR NOT GMP_FOUND)
set(NETTLE_FOUND 0)
endif()
+
+if(Nettle_FIND_REQUIRED AND NOT NETTLE_FOUND)
+ message(FATAL_ERROR "Could not find Nettle")
+endif()
diff --git a/cmake/Modules/FindPixman.cmake b/cmake/Modules/FindPixman.cmake
index 04fe481f..f024b71a 100644
--- a/cmake/Modules/FindPixman.cmake
+++ b/cmake/Modules/FindPixman.cmake
@@ -7,3 +7,7 @@ else()
find_library(PIXMAN_LIBRARIES NAMES pixman-1)
find_package_handle_standard_args(PIXMAN DEFAULT_MSG PIXMAN_LIBRARIES PIXMAN_INCLUDE_DIRS)
endif()
+
+if(Pixman_FIND_REQUIRED AND NOT PIXMAN_FOUND)
+ message(FATAL_ERROR "Could not find Pixman")
+endif()