You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by as...@apache.org on 2019/06/18 14:24:47 UTC

[qpid-proton] branch master updated: PROTON-2068: Add imported targets to cmake find proton package files - This allows Proton users to use imported targets Proton::core, Proton::proactor and Proton::cpp to link to this libraries.

This is an automated email from the ASF dual-hosted git repository.

astitcher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git


The following commit(s) were added to refs/heads/master by this push:
     new 0a691f0  PROTON-2068: Add imported targets to cmake find proton package files - This allows Proton users to use imported targets Proton::core,   Proton::proactor and Proton::cpp to link to this libraries.
0a691f0 is described below

commit 0a691f0e8d2ac45d1999d7b4af1807037ac5a0f5
Author: Andrew Stitcher <as...@apache.org>
AuthorDate: Tue Jun 18 01:49:16 2019 -0400

    PROTON-2068: Add imported targets to cmake find proton package files
    - This allows Proton users to use imported targets Proton::core,
      Proton::proactor and Proton::cpp to link to this libraries.
---
 c/src/ProtonConfig.cmake.in  | 21 +++++++++++++++++++++
 cpp/ProtonCppConfig.cmake.in | 10 ++++++++++
 2 files changed, 31 insertions(+)

diff --git a/c/src/ProtonConfig.cmake.in b/c/src/ProtonConfig.cmake.in
index 5b23be0..7b604d0 100644
--- a/c/src/ProtonConfig.cmake.in
+++ b/c/src/ProtonConfig.cmake.in
@@ -30,12 +30,33 @@ set (Proton_FOUND True)
 
 set (Proton_Core_INCLUDE_DIRS  @INCLUDEDIR@)
 set (Proton_Core_LIBRARIES     optimized @LIBDIR@/@PROTONCORELIB@ debug @LIBDIR@/@PROTONCORELIBDEBUG@)
+
+# Add modular target in a way compatible with cmake 2.8.12
+if (NOT TARGET Proton::core)
+  add_library(Proton::core UNKNOWN IMPORTED)
+  set_target_properties(Proton::core
+    PROPERTIES
+      IMPORTED_LOCATION "@LIBDIR@/@PROTONCORELIB@"
+      IMPORTED_LOCATION_DEBUG "@LIBDIR@/@PROTONCORELIBDEBUG@"
+      INTERFACE_INCLUDE_DIRECTORIES "${Proton_Core_INCLUDE_DIRS}")
+endif()
+
 set (Proton_Core_FOUND True)
 
 set (HAS_PROACTOR @HAS_PROACTOR@)
 if (HAS_PROACTOR)
   set (Proton_Proactor_INCLUDE_DIRS  @INCLUDEDIR@)
   set (Proton_Proactor_LIBRARIES     optimized @LIBDIR@/@PROTONPROACTORLIB@ debug @LIBDIR@/@PROTONPROACTORLIBDEBUG@)
+  # Add modular target in a way compatible with cmake 2.8.12
+  if (NOT TARGET Proton::proactor)
+    add_library(Proton::proactor UNKNOWN IMPORTED)
+    set_target_properties(Proton::proactor
+      PROPERTIES
+        IMPORTED_LOCATION "@LIBDIR@/@PROTONPROACTORLIB@"
+        IMPORTED_LOCATION_DEBUG "@LIBDIR@/@PROTONPROACTORLIBDEBUG@"
+        INTERFACE_INCLUDE_DIRECTORIES "${Proton_Proactor_INCLUDE_DIRS}")
+  endif()
+
   set (Proton_Proactor_FOUND True)
 endif()
 
diff --git a/cpp/ProtonCppConfig.cmake.in b/cpp/ProtonCppConfig.cmake.in
index 0068067..2bc08f6 100644
--- a/cpp/ProtonCppConfig.cmake.in
+++ b/cpp/ProtonCppConfig.cmake.in
@@ -27,4 +27,14 @@ set (ProtonCpp_VERSION       @PN_VERSION@)
 set (ProtonCpp_INCLUDE_DIRS  @INCLUDEDIR@)
 set (ProtonCpp_LIBRARIES     optimized @LIBDIR@/@PROTONCPPLIB@ debug @LIBDIR@/@PROTONCPPLIBDEBUG@)
 
+if (NOT TARGET Proton::cpp)
+  # Sigh.. have to make this compat with cmake 2.8.12
+  add_library(Proton::cpp UNKNOWN IMPORTED)
+  set_target_properties(Proton::cpp
+    PROPERTIES
+      IMPORTED_LOCATION "@LIBDIR@/@PROTONCPPLIB@"
+      IMPORTED_LOCATION_DEBUG "@LIBDIR@/@PROTONCPPLIBDEBUG@"
+      INTERFACE_INCLUDE_DIRECTORIES "${ProtonCpp_INCLUDE_DIRS}")
+endif()
+
 set (ProtonCpp_FOUND True)


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org