aboutsummaryrefslogtreecommitdiff
path: root/cmake/modules/FindJansson.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/modules/FindJansson.cmake')
-rw-r--r--cmake/modules/FindJansson.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/cmake/modules/FindJansson.cmake b/cmake/modules/FindJansson.cmake
index feed563be..b48a041a4 100644
--- a/cmake/modules/FindJansson.cmake
+++ b/cmake/modules/FindJansson.cmake
@@ -52,5 +52,13 @@ else()
VERSION_VAR
Jansson_VERSION_STRING)
mark_as_advanced(Jansson_INCLUDE_DIR Jansson_LIBRARIES)
+
+ if(Jansson_FOUND AND NOT TARGET Jansson::Jansson)
+ add_library(Jansson::Jansson UNKNOWN IMPORTED)
+ set_target_properties(Jansson::Jansson PROPERTIES
+ IMPORTED_LOCATION "${Jansson_LIBRARIES}"
+ INTERFACE_INCLUDE_DIRECTORIES "${Jansson_INCLUDE_DIR}"
+ )
+ endif()
endif()