summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPanu Matilainen <pmatilai@redhat.com>2023-04-06 10:45:39 +0300
committerPanu Matilainen <pmatilai@redhat.com>2023-04-06 11:07:04 +0300
commitc61da285a14e98592e5cac1966b169d178868471 (patch)
treed95e4b8cedf85ac7ad10dee6e2a7c9b25954ea27
parent5e1addc04892be381248631e960cea86c4389ea7 (diff)
downloadrpm-c61da285a14e98592e5cac1966b169d178868471.tar.gz
Let cmake handle checking for mandatory components
Both find_path() and find_library() accept REQUIRED argument, use it instead of rolling our own.
-rw-r--r--CMakeLists.txt7
1 files changed, 2 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2a71946cf..e965688a3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -194,11 +194,8 @@ endif()
if (WITH_IMAEVM)
list(APPEND REQFUNCS lsetxattr)
- find_path(IMA_INCLUDE_DIR NAMES imaevm.h)
- find_library(IMA_LIBRARY NAMES imaevm)
- if (NOT (IMA_INCLUDE_DIR AND IMA_LIBRARY))
- message(FATAL_ERROR "imaevm enabled but library not present")
- endif()
+ find_path(IMA_INCLUDE_DIR NAMES imaevm.h REQUIRED)
+ find_library(IMA_LIBRARY NAMES imaevm REQUIRED)
endif()
find_program(__FIND_DEBUGINFO find-debuginfo)