aboutsummaryrefslogtreecommitdiff
path: root/find-modules
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2021-12-09 15:04:52 -0800
committerRosen Penev <rosenp@gmail.com>2021-12-09 15:04:52 -0800
commitee7b870eb18b040d45fa07fe8efdc9698d01407e (patch)
tree9e8390d2c79f8a4db2067e74e6c247e85ce8486a /find-modules
parent7d81e61da2127685298d91ebc041ec26bc086d1a (diff)
downloadextra-cmake-modules-ee7b870eb18b040d45fa07fe8efdc9698d01407e.tar.gz
extra-cmake-modules-ee7b870eb18b040d45fa07fe8efdc9698d01407e.tar.bz2
FindInotify.cmake: add target support
Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'find-modules')
-rw-r--r--find-modules/FindInotify.cmake7
1 files changed, 6 insertions, 1 deletions
diff --git a/find-modules/FindInotify.cmake b/find-modules/FindInotify.cmake
index c1c5cc1b..5206b733 100644
--- a/find-modules/FindInotify.cmake
+++ b/find-modules/FindInotify.cmake
@@ -54,8 +54,13 @@ if(Inotify_INCLUDE_DIRS)
DESCRIPTION "inotify API on the *BSD family of operating systems."
)
endif()
+ if(NOT TARGET Inotify::Inotify)
+ add_library(Inotify::Inotify INTERFACE IMPORTED)
+ set_property(TARGET Inotify::Inotify PROPERTY INTERFACE_INCLUDE_DIRECTORIES "${Inotify_INCLUDE_DIRS}")
+ set_property(TARGET Inotify::Inotify PROPERTY INTERFACE_LINK_LIBRARIES "${Inotify_LIBRARIES}")
+ endif()
else()
- set(Inotify_FOUND FALSE)
+ set(Inotify_FOUND FALSE)
endif()
mark_as_advanced(Inotify_LIBRARIES Inotify_INCLUDE_DIRS)