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

pengzheng pushed a commit to branch feature/579-automatic-dependency-deduction
in repository https://gitbox.apache.org/repos/asf/celix.git


The following commit(s) were added to 
refs/heads/feature/579-automatic-dependency-deduction by this push:
     new fd2c5f23 Recover Findlibuuid.cmake
fd2c5f23 is described below

commit fd2c5f23f2b73441dbb2b7a9365d2b111f3108b0
Author: PengZheng <[email protected]>
AuthorDate: Sat Jul 15 00:31:23 2023 +0800

    Recover Findlibuuid.cmake
---
 cmake/Modules/Findlibuuid.cmake | 37 ++++++++++---------------------------
 1 file changed, 10 insertions(+), 27 deletions(-)

diff --git a/cmake/Modules/Findlibuuid.cmake b/cmake/Modules/Findlibuuid.cmake
index 259d7a86..b0e47200 100644
--- a/cmake/Modules/Findlibuuid.cmake
+++ b/cmake/Modules/Findlibuuid.cmake
@@ -25,37 +25,20 @@
 find_path(UUID_INCLUDE_DIR uuid/uuid.h
         /usr/include
         /usr/local/include )
-include(FindPackageHandleStandardArgs)
 
+find_library(UUID_LIBRARY NAMES uuid
+        PATHS /usr/lib /usr/local/lib /usr/lib64 /usr/local/lib64 
/lib/i386-linux-gnu /lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu)
+
+include(FindPackageHandleStandardArgs)
 if (APPLE)
-    find_package_handle_standard_args(libuuid DEFAULT_MSG
+    find_package_handle_standard_args(UUID  DEFAULT_MSG
             UUID_INCLUDE_DIR)
-
-    mark_as_advanced(UUID_INCLUDE_DIR)
-    set(UUID_INCLUDE_DIRS ${UUID_INCLUDE_DIR})
-    if (libuuid_FOUND AND NOT TARGET libuuid::libuuid)
-        add_library(libuuid::libuuid INTERFACE IMPORTED)
-        set_target_properties(libuuid::libuuid PROPERTIES
-                INTERFACE_INCLUDE_DIRECTORIES "${UUID_INCLUDE_DIR}"
-                )
-    endif ()
 else ()
-    find_library(UUID_LIBRARY NAMES uuid
-            PATHS /usr/lib /usr/local/lib /usr/lib64 /usr/local/lib64 
/lib/i386-linux-gnu /lib/x86_64-linux-gnu /usr/lib/x86_64-linux-gnu)
-
-    find_package_handle_standard_args(libuuid DEFAULT_MSG
+    find_package_handle_standard_args(UUID  DEFAULT_MSG
             UUID_LIBRARY UUID_INCLUDE_DIR)
-
-    mark_as_advanced(UUID_INCLUDE_DIR UUID_LIBRARY)
-    set(UUID_INCLUDE_DIRS ${UUID_INCLUDE_DIR})
-    set(UUID_LIBRARIES ${UUID_LIBRARY})
-
-    if (libuuid_FOUND AND NOT TARGET libuuid::libuuid)
-        add_library(libuuid::libuuid SHARED IMPORTED)
-        set_target_properties(libuuid::libuuid PROPERTIES
-                IMPORTED_LOCATION "${UUID_LIBRARY}"
-                INTERFACE_INCLUDE_DIRECTORIES "${UUID_INCLUDE_DIR}"
-                )
-    endif ()
 endif ()
 
+
+mark_as_advanced(UUID_INCLUDE_DIR UUID_LIBRARY)
+set(UUID_INCLUDE_DIRS ${UUID_INCLUDE_DIR})
+set(UUID_LIBRARIES ${UUID_LIBRARY})
\ No newline at end of file

Reply via email to