summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorMichal Domonkos <mdomonko@redhat.com>2023-04-11 12:25:41 +0200
committerPanu Matilainen <pmatilai@redhat.com>2023-04-11 13:50:43 +0300
commit909d237b5eddfbc43051f75d8f96688448026496 (patch)
tree34ab999b80562923af5177432c1f78b532d3aaad /CMakeLists.txt
parent62395521a9aea856c225de1baf767707ed235f98 (diff)
downloadrpm-909d237b5eddfbc43051f75d8f96688448026496.tar.gz
Handle IMA as an imported target, take II
Another attempt at commit 7184fb80137363e39d79e2b5a0eb2c4fb060cc2e.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4db2bb824..7c5f5147a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -202,8 +202,12 @@ endif()
if (WITH_IMAEVM)
list(APPEND REQFUNCS lsetxattr)
+ add_library(IMA::IMA UNKNOWN IMPORTED)
find_path(IMA_INCLUDE_DIR NAMES imaevm.h REQUIRED)
find_library(IMA_LIBRARY NAMES imaevm REQUIRED)
+ set_target_properties(IMA::IMA PROPERTIES
+ IMPORTED_LOCATION "${IMA_LIBRARY}")
+ target_include_directories(IMA::IMA INTERFACE "${IMA_INCLUDE_DIR}")
endif()
find_program(__FIND_DEBUGINFO find-debuginfo)