diff options
author | Martchus <martchus@gmx.net> | 2017-03-23 21:48:04 +0100 |
---|---|---|
committer | Martchus <martchus@gmx.net> | 2017-03-23 21:48:04 +0100 |
commit | 13f0799ec3ceb45e07cda4a79417d7272cf576c2 (patch) | |
tree | 0de41034f695ddd3561831a508cf8f18b51ad789 /0002-Export-targets.patch | |
download | pistache-git-13f0799ec3ceb45e07cda4a79417d7272cf576c2.tar.xz pistache-git-13f0799ec3ceb45e07cda4a79417d7272cf576c2.zip |
Initial import
Diffstat (limited to '')
-rw-r--r-- | 0002-Export-targets.patch | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/0002-Export-targets.patch b/0002-Export-targets.patch new file mode 100644 index 0000000..e390688 --- /dev/null +++ b/0002-Export-targets.patch @@ -0,0 +1,76 @@ +From 431986f951f5f5b3028e9262eed0e56d0f861dee Mon Sep 17 00:00:00 2001 +From: Martchus <martchus@gmx.net> +Date: Thu, 23 Mar 2017 20:50:21 +0100 +Subject: [PATCH 2/2] Export targets + +--- + CMakeLists.txt | 2 +- + src/CMakeLists.txt | 29 +++++++++++++++++++++++++++-- + src/PistacheConfig.cmake.in | 4 ++++ + 3 files changed, 32 insertions(+), 3 deletions(-) + create mode 100644 src/PistacheConfig.cmake.in + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index e2c9916..0197e24 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -1,4 +1,4 @@ +-cmake_minimum_required (VERSION 2.8.7) ++cmake_minimum_required (VERSION 3.0.2) + project (pistache) + include(CheckCXXCompilerFlag) + +diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt +index 60902dd..c1d88e4 100644 +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -10,9 +10,34 @@ set(SOURCE_FILES + + add_library(pistache_static ${SOURCE_FILES}) + target_link_libraries(pistache_static pthread) +-install(TARGETS pistache_static DESTINATION lib) ++install(TARGETS pistache_static ++ EXPORT PistacheStaticTargets ++ DESTINATION lib) ++install(EXPORT PistacheStaticTargets ++ DESTINATION "lib/cmake/pistache" ++ EXPORT_LINK_INTERFACE_LIBRARIES ++ COMPONENT cmake-config ++) + + add_library(pistache SHARED ${SOURCE_FILES}) + target_link_libraries(pistache pthread) +-install(TARGETS pistache DESTINATION lib) ++install(TARGETS pistache ++ EXPORT PistacheSharedTargets ++ DESTINATION lib) ++install(EXPORT PistacheSharedTargets ++ DESTINATION "lib/cmake/pistache" ++ EXPORT_LINK_INTERFACE_LIBRARIES ++ COMPONENT cmake-config ++) + ++include(CMakePackageConfigHelpers) ++configure_package_config_file( ++ "PistacheConfig.cmake.in" ++ "${CMAKE_CURRENT_BINARY_DIR}/PistacheConfig.cmake" ++ INSTALL_DESTINATION "lib/cmake/pistache" ++) ++install( ++ FILES "${CMAKE_CURRENT_BINARY_DIR}/PistacheConfig.cmake" ++ DESTINATION "lib/cmake/pistache" ++ COMPONENT cmake-config ++) +diff --git a/src/PistacheConfig.cmake.in b/src/PistacheConfig.cmake.in +new file mode 100644 +index 0000000..a5dca28 +--- /dev/null ++++ b/src/PistacheConfig.cmake.in +@@ -0,0 +1,4 @@ ++@PACKAGE_INIT@ ++ ++include("${CMAKE_CURRENT_LIST_DIR}/PistacheSharedTargets.cmake") ++include("${CMAKE_CURRENT_LIST_DIR}/PistacheStaticTargets.cmake") +-- +2.12.1 + |