aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetri Lehtinen <petri@digip.org>2016-09-12 07:46:52 +0300
committerGitHub <noreply@github.com>2016-09-12 07:46:52 +0300
commitf9e7aa5eebf5b1a76c5b2415f6d17d335baaf56c (patch)
treebaa8dd4c214321668f3404e8cdeaa5d1ce5870d5
parenta2bbb44d9615b2b72dab984b9bbc17f9365fcca0 (diff)
parent9258671924b54aaedb2654cf0eb72344c2686b18 (diff)
downloadjansson-f9e7aa5eebf5b1a76c5b2415f6d17d335baaf56c.zip
jansson-f9e7aa5eebf5b1a76c5b2415f6d17d335baaf56c.tar.gz
jansson-f9e7aa5eebf5b1a76c5b2415f6d17d335baaf56c.tar.bz2
Merge pull request #305 from warmwaffles/master
Allow install targets to be optionally defined
-rw-r--r--CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index da844a9..8808070 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -655,6 +655,8 @@ set_target_properties(jansson PROPERTIES PUBLIC_HEADER "${JANSSON_HDR_PUBLIC}")
#
# Install targets.
#
+option(JANSSON_INSTALL "Generate installation target" ON)
+if (JANSSON_INSTALL)
install(TARGETS jansson
EXPORT JanssonTargets
LIBRARY DESTINATION "${JANSSON_INSTALL_LIB_DIR}" COMPONENT lib
@@ -676,6 +678,7 @@ install(FILES
# Install exports for the install-tree.
install(EXPORT JanssonTargets
DESTINATION "${JANSSON_INSTALL_CMAKE_DIR}" COMPONENT dev)
+endif()
# For use when simply using add_library from a parent project to build jansson.
set(JANSSON_LIBRARIES jansson CACHE STRING "Jansson libraries")