aboutsummaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorPetri Lehtinen <petri@digip.org>2018-05-18 08:08:32 +0300
committerGitHub <noreply@github.com>2018-05-18 08:08:32 +0300
commit80cea73bf984f2763130057575a7d949e787851c (patch)
tree791e540fbc36647d7671b292910447c1a86d1325 /cmake
parente28bcfeac863b5f3fab86b14e6803478083fb32a (diff)
parent2c98c30a02e0d8ba004f9db7005dc7fbd9a90f1b (diff)
downloadjansson-80cea73bf984f2763130057575a7d949e787851c.zip
jansson-80cea73bf984f2763130057575a7d949e787851c.tar.gz
jansson-80cea73bf984f2763130057575a7d949e787851c.tar.bz2
Merge pull request #408 from isaachier/cmake
CMake improvements, make package relocatable
Diffstat (limited to 'cmake')
-rw-r--r--cmake/JanssonConfig.cmake.in17
-rw-r--r--cmake/JanssonConfigVersion.cmake.in11
-rw-r--r--cmake/janssonConfig.cmake.in4
3 files changed, 4 insertions, 28 deletions
diff --git a/cmake/JanssonConfig.cmake.in b/cmake/JanssonConfig.cmake.in
deleted file mode 100644
index d00b3c4..0000000
--- a/cmake/JanssonConfig.cmake.in
+++ /dev/null
@@ -1,17 +0,0 @@
-# - Config file for the jansson package
-# It defines the following variables
-# JANSSON_INCLUDE_DIRS - include directories for FooBar
-# JANSSON_LIBRARIES - libraries to link against
-
-# Get the path of the current file.
-get_filename_component(JANSSON_CMAKE_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
-
-# Set the include directories.
-set(JANSSON_INCLUDE_DIRS "@JANSSON__INCLUDE_DIRS@")
-
-# Include the project Targets file, this contains definitions for IMPORTED targets.
-include(${JANSSON_CMAKE_DIR}/JanssonTargets.cmake)
-
-# IMPORTED targets from JanssonTargets.cmake
-set(JANSSON_LIBRARIES jansson)
-
diff --git a/cmake/JanssonConfigVersion.cmake.in b/cmake/JanssonConfigVersion.cmake.in
deleted file mode 100644
index 83b0d74..0000000
--- a/cmake/JanssonConfigVersion.cmake.in
+++ /dev/null
@@ -1,11 +0,0 @@
-set(PACKAGE_VERSION "@JANSSON_DISPLAY_VERSION@")
-
-# Check whether the requested PACKAGE_FIND_VERSION is compatible
-if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}")
- set(PACKAGE_VERSION_COMPATIBLE FALSE)
-else()
- set(PACKAGE_VERSION_COMPATIBLE TRUE)
- if ("${PACKAGE_VERSION}" VERSION_EQUAL "${PACKAGE_FIND_VERSION}")
- set(PACKAGE_VERSION_EXACT TRUE)
- endif()
-endif()
diff --git a/cmake/janssonConfig.cmake.in b/cmake/janssonConfig.cmake.in
new file mode 100644
index 0000000..abd6793
--- /dev/null
+++ b/cmake/janssonConfig.cmake.in
@@ -0,0 +1,4 @@
+@PACKAGE_INIT@
+
+include("${CMAKE_CURRENT_LIST_DIR}/janssonTargets.cmake")
+check_required_components("@PROJECT_NAME@")