From 993a4fe1536f80ed4fe59f3ef69cac545b7c5ca8 Mon Sep 17 00:00:00 2001 From: Florian Reimold <11774314+FlorianReimold@users.noreply.github.com> Date: Tue, 24 Jan 2023 11:22:16 +0100 Subject: [PATCH] CMake: improved tcp_pubsubConfig.cmake with find_dependency (#20) - Replaced find_package with find_dependency call that is designed to be used in Package configuration files - Replaced configured install-dir with a lookup in the CURRENT_LIST_DIR --- tcp_pubsub/cmake/tcp_pubsubConfig.cmake.in | 6 ++++-- tcp_pubsub/version.cmake | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tcp_pubsub/cmake/tcp_pubsubConfig.cmake.in b/tcp_pubsub/cmake/tcp_pubsubConfig.cmake.in index e4dd17a..553b0b1 100644 --- a/tcp_pubsub/cmake/tcp_pubsubConfig.cmake.in +++ b/tcp_pubsub/cmake/tcp_pubsubConfig.cmake.in @@ -1,4 +1,6 @@ @PACKAGE_INIT@ -INCLUDE("@PACKAGE_TCP_PUBSUB_INSTALL_CMAKE_DIR@/tcp_pubsubTargets.cmake") -find_package(Threads) +include(CMakeFindDependencyMacro) +find_dependency(Threads) + +include("${CMAKE_CURRENT_LIST_DIR}/tcp_pubsubTargets.cmake") diff --git a/tcp_pubsub/version.cmake b/tcp_pubsub/version.cmake index 410e8bd..4b0283c 100644 --- a/tcp_pubsub/version.cmake +++ b/tcp_pubsub/version.cmake @@ -1,3 +1,3 @@ set(TCP_PUBSUB_VERSION_MAJOR 1) set(TCP_PUBSUB_VERSION_MINOR 0) -set(TCP_PUBSUB_VERSION_PATCH 3) +set(TCP_PUBSUB_VERSION_PATCH 4)