summaryrefslogtreecommitdiff
path: root/library
diff options
context:
space:
mode:
authorAki <please@ignore.pl>2021-10-15 23:12:41 +0200
committerAki <please@ignore.pl>2021-10-15 23:12:41 +0200
commit08c67e6be1c2ca4d0f72cfceb95241d042b3d078 (patch)
treef688ec45f981b0b79f25cdf2596007f1c1d5778e /library
parent17a6f793b482ce3e475c9d5e57030a7ed7ae0588 (diff)
downloadhwd-08c67e6be1c2ca4d0f72cfceb95241d042b3d078.zip
hwd-08c67e6be1c2ca4d0f72cfceb95241d042b3d078.tar.gz
hwd-08c67e6be1c2ca4d0f72cfceb95241d042b3d078.tar.bz2
Added package config file to cmake installation
Diffstat (limited to 'library')
-rw-r--r--library/CMakeLists.txt9
-rw-r--r--library/cmake/Config.cmake.in6
2 files changed, 15 insertions, 0 deletions
diff --git a/library/CMakeLists.txt b/library/CMakeLists.txt
index a1e146b..6eaac8f 100644
--- a/library/CMakeLists.txt
+++ b/library/CMakeLists.txt
@@ -14,6 +14,11 @@ target_include_directories(${PROJECT_NAME}
set_target_properties(${PROJECT_NAME}
PROPERTIES OUTPUT_NAME hwd
)
+configure_package_config_file(
+ cmake/Config.cmake.in
+ ${CMAKE_CURRENT_BINARY_DIR}/HwdConfig.cmake
+ INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/Hwd
+ )
install(TARGETS ${PROJECT_NAME}
EXPORT HwdTargets
RUNTIME
@@ -27,3 +32,7 @@ install(EXPORT HwdTargets
NAMESPACE Hwd::
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/Hwd
)
+install(FILES
+ ${CMAKE_CURRENT_BINARY_DIR}/HwdConfig.cmake
+ DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/Hwd
+ )
diff --git a/library/cmake/Config.cmake.in b/library/cmake/Config.cmake.in
new file mode 100644
index 0000000..2e273ca
--- /dev/null
+++ b/library/cmake/Config.cmake.in
@@ -0,0 +1,6 @@
+@PACKAGE_INIT@
+include(CMakeFindDependencyMacro)
+find_package(Threads REQUIRED)
+find_package(rpclib 2 REQUIRED)
+include("${CMAKE_CURRENT_LIST_DIR}/HwdTargets.cmake")
+check_required_components(library)