PKGBUILDs/pistache/git/0001-Export-targets.patch

63 lines
1.8 KiB
Diff
Raw Normal View History

2017-07-03 22:45:00 +02:00
From ef1474e0c587bb528532932c1db7e244755e5d49 Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Thu, 23 Mar 2017 20:50:21 +0100
2017-07-03 22:45:00 +02:00
Subject: [PATCH] Export targets
---
CMakeLists.txt | 2 +-
2017-07-03 22:45:00 +02:00
src/CMakeLists.txt | 20 ++++++++++++++++++++
src/PistacheConfig.cmake.in | 3 +++
3 files changed, 24 insertions(+), 1 deletion(-)
create mode 100644 src/PistacheConfig.cmake.in
diff --git a/CMakeLists.txt b/CMakeLists.txt
2017-07-03 22:45:00 +02:00
index de5716d..25e3d7c 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
2017-07-03 22:45:00 +02:00
index 639ed0d..06cdb78 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
2017-07-03 22:45:00 +02:00
@@ -40,3 +40,23 @@ install(
DIRECTORY "${PROJECT_SOURCE_DIR}/include/pistache"
DESTINATION ${include_install_dir}
FILES_MATCHING PATTERN "*.*h")
+install(TARGETS pistache
2017-07-03 22:45:00 +02:00
+ EXPORT PistacheTargets
+ DESTINATION lib)
2017-07-03 22:45:00 +02:00
+install(EXPORT PistacheTargets
+ DESTINATION "lib/cmake/pistache"
+ EXPORT_LINK_INTERFACE_LIBRARIES
+ COMPONENT cmake-config
+)
2017-07-03 22:45:00 +02:00
+
+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
2017-07-03 22:45:00 +02:00
index 0000000..e8e92f0
--- /dev/null
+++ b/src/PistacheConfig.cmake.in
2017-07-03 22:45:00 +02:00
@@ -0,0 +1,3 @@
+@PACKAGE_INIT@
+
2017-07-03 22:45:00 +02:00
+include("${CMAKE_CURRENT_LIST_DIR}/PistacheTargets.cmake")
--
2017-07-03 22:45:00 +02:00
2.13.2