aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmake/modules/FindJansson.cmake8
-rw-r--r--paludis/repositories/gemcutter/CMakeLists.txt5
2 files changed, 9 insertions, 4 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()
diff --git a/paludis/repositories/gemcutter/CMakeLists.txt b/paludis/repositories/gemcutter/CMakeLists.txt
index dff65d181..a3ed4a4af 100644
--- a/paludis/repositories/gemcutter/CMakeLists.txt
+++ b/paludis/repositories/gemcutter/CMakeLists.txt
@@ -13,12 +13,9 @@ add_dependencies(libpaludisgemcutterrepository libpaludisutil_SE)
paludis_add_library(libpaludisgemcutterrepositoryjsonthings
json_things.cc)
-target_include_directories(libpaludisgemcutterrepositoryjsonthings
- PRIVATE
- ${Jansson_INCLUDE_DIRS})
target_link_libraries(libpaludisgemcutterrepositoryjsonthings
PRIVATE
- ${Jansson_LIBRARIES})
+ Jansson::Jansson)
install(TARGETS
libpaludisgemcutterrepositoryjsonthings