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

pengzheng pushed a commit to branch feature/483-conan-2-support
in repository https://gitbox.apache.org/repos/asf/celix.git


The following commit(s) were added to refs/heads/feature/483-conan-2-support by 
this push:
     new 4e7c7a48 Avoid breaking downstream user who link to these targets.
4e7c7a48 is described below

commit 4e7c7a4890cdecaa3445b803c55d9fa9b5a8a5e4
Author: PengZheng <[email protected]>
AuthorDate: Thu Aug 24 19:26:01 2023 +0800

    Avoid breaking downstream user who link to these targets.
---
 cmake/Modules/FindCppUTest.cmake  | 6 ++++++
 cmake/Modules/FindRapidJSON.cmake | 3 +++
 cmake/Modules/FindZeroMQ.cmake    | 3 +++
 cmake/Modules/Findczmq.cmake      | 3 +++
 cmake/Modules/Findlibzip.cmake    | 3 +++
 5 files changed, 18 insertions(+)

diff --git a/cmake/Modules/FindCppUTest.cmake b/cmake/Modules/FindCppUTest.cmake
index 8b4c54e0..b747b7d1 100644
--- a/cmake/Modules/FindCppUTest.cmake
+++ b/cmake/Modules/FindCppUTest.cmake
@@ -50,6 +50,9 @@ IF(CppUTest_FOUND)
                 IMPORTED_LOCATION "${CppUTest_LIBRARY}"
                 INTERFACE_INCLUDE_DIRECTORIES "${CppUTest_INCLUDE_DIR}"
                 )
+        if (NOT TARGET CppUTest::CppUTest)
+            add_library(CppUTest::CppUTest ALIAS CppUTest)
+        endif ()
     endif()
     SET(CppUTest_EXT_LIBRARIES ${CppUTest_EXT_LIBRARY})
     SET(CppUTest_EXT_INCLUDE_DIRS ${CppUTest_EXT_INCLUDE_DIR})
@@ -59,5 +62,8 @@ IF(CppUTest_FOUND)
                 IMPORTED_LOCATION "${CppUTest_EXT_LIBRARY}"
                 INTERFACE_INCLUDE_DIRECTORIES "${CppUTest_EXT_INCLUDE_DIR}"
                 )
+        if (NOT TARGET CppUTest::CppUTestExt)
+            add_library(CppUTest::CppUTestExt ALIAS CppUTestExt)
+        endif ()
     endif()
 ENDIF(CppUTest_FOUND)
diff --git a/cmake/Modules/FindRapidJSON.cmake 
b/cmake/Modules/FindRapidJSON.cmake
index 083d9c41..61bda695 100644
--- a/cmake/Modules/FindRapidJSON.cmake
+++ b/cmake/Modules/FindRapidJSON.cmake
@@ -32,4 +32,7 @@ if(RapidJSON_FOUND AND NOT TARGET rapidjson)
     add_library(rapidjson INTERFACE IMPORTED)
     set_target_properties(rapidjson PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
             "${RapidJSON_INCLUDE_DIRS}")
+    if (NOT TARGET RapidJSON::RapidJSON)
+        add_library(RapidJSON::RapidJSON ALIAS rapidjson)
+    endif ()
 endif()
diff --git a/cmake/Modules/FindZeroMQ.cmake b/cmake/Modules/FindZeroMQ.cmake
index e6f5d021..0d097c0f 100644
--- a/cmake/Modules/FindZeroMQ.cmake
+++ b/cmake/Modules/FindZeroMQ.cmake
@@ -48,4 +48,7 @@ if (ZeroMQ_FOUND AND NOT TARGET libzmq)
             IMPORTED_LOCATION "${ZEROMQ_LIBRARY}"
             INTERFACE_INCLUDE_DIRECTORIES "${ZEROMQ_INCLUDE_DIR}"
     )
+    if (NOT TARGET ZeroMQ::ZeroMQ)
+        add_library(ZeroMQ::ZeroMQ ALIAS libzmq)
+    endif ()
 endif ()
diff --git a/cmake/Modules/Findczmq.cmake b/cmake/Modules/Findczmq.cmake
index 8a3edf5b..330850a5 100644
--- a/cmake/Modules/Findczmq.cmake
+++ b/cmake/Modules/Findczmq.cmake
@@ -48,4 +48,7 @@ if (czmq_FOUND AND NOT TARGET czmq)
             IMPORTED_LOCATION "${CZMQ_LIBRARY}"
             INTERFACE_INCLUDE_DIRECTORIES "${CZMQ_INCLUDE_DIR}"
     )
+    if (NOT TARGET czmq::czmq)
+        add_library(czmq::czmq ALIAS czmq)
+    endif ()
 endif ()
diff --git a/cmake/Modules/Findlibzip.cmake b/cmake/Modules/Findlibzip.cmake
index 5cf2725c..d93b4041 100644
--- a/cmake/Modules/Findlibzip.cmake
+++ b/cmake/Modules/Findlibzip.cmake
@@ -43,6 +43,9 @@ if(libzip_FOUND AND NOT TARGET libzip::zip)
             IMPORTED_LOCATION "${LIBZIP_LIBRARY}"
             INTERFACE_INCLUDE_DIRECTORIES "${LIBZIP_INCLUDE_DIR}"
     )
+    if (NOT TARGET libzip::libzip)
+        add_library(libzip::libzip ALIAS libzip::zip)
+    endif ()
 endif()
 
 unset(LIBZIP_LIBRARY)

Reply via email to