From cb4bba703176fed91a8bdac8cf15e9df7d1d8a14 Mon Sep 17 00:00:00 2001 From: Lazy_V <954294627@qq.com> Date: Fri, 21 Apr 2023 00:22:42 +0800 Subject: [PATCH] Fix #77 for Debian family. --- CMakeLists.txt | 7 ++----- cmake/Config.cmake.in | 14 -------------- cmake/FindLibuuid.cmake | 17 ----------------- how_to_build.md | 11 +++++++++++ 4 files changed, 13 insertions(+), 36 deletions(-) delete mode 100644 cmake/Config.cmake.in delete mode 100644 cmake/FindLibuuid.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 73b5658..1cd743c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,11 +29,8 @@ if (UUID_SYSTEM_GENERATOR) find_library(CFLIB CoreFoundation REQUIRED) target_link_libraries(${PROJECT_NAME} INTERFACE ${CFLIB}) else () - find_package(Libuuid REQUIRED) - if (Libuuid_FOUND) - target_include_directories(${PROJECT_NAME} INTERFACE ${Libuuid_INCLUDE_DIRS}) - target_link_libraries(${PROJECT_NAME} INTERFACE ${Libuuid_LIBRARIES}) - endif () + target_include_directories(${PROJECT_NAME} INTERFACE /usr/include/uuid) + target_link_libraries(${PROJECT_NAME} INTERFACE uuid) endif () endif () diff --git a/cmake/Config.cmake.in b/cmake/Config.cmake.in deleted file mode 100644 index 7217b72..0000000 --- a/cmake/Config.cmake.in +++ /dev/null @@ -1,14 +0,0 @@ -@PACKAGE_INIT@ - -include(CMakeFindDependencyMacro) -if (@UUID_SYSTEM_GENERATOR@) - if (WIN32 OR APPLE) - else () - list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}) - find_dependency(Libuuid REQUIRED) - endif () -endif () - -include("${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@-targets.cmake") - -check_required_components(@PROJECT_NAME@) \ No newline at end of file diff --git a/cmake/FindLibuuid.cmake b/cmake/FindLibuuid.cmake deleted file mode 100644 index 7e276d1..0000000 --- a/cmake/FindLibuuid.cmake +++ /dev/null @@ -1,17 +0,0 @@ -find_path(Libuuid_INCLUDE_DIRS uuid/uuid.h) -find_library(Libuuid_LIBRARIES uuid) - -if (Libuuid_LIBRARIES AND Libuuid_INCLUDE_DIRS) - set(Libuuid_FOUND YES) - if (NOT Libuuid_FIND_QUIETLY) - message(STATUS "Found libuuid: ${Libuuid_LIBRARIES}") - endif () -else () - if (Libuuid_FIND_REQUIRED) - message(SEND_ERROR "Could NOT find libuuid") - else () - if (NOT Libuuid_FIND_QUIETLY) - message(STATUS "Could NOT find libuuid") - endif () - endif () -endif () \ No newline at end of file diff --git a/how_to_build.md b/how_to_build.md index 9e20e2a..081d7fb 100644 --- a/how_to_build.md +++ b/how_to_build.md @@ -38,3 +38,14 @@ cd build ``` cmake -G Xcode .. ``` + +## Linux + +Debian family: + +Install the dependency package (uuid-dev): + +```bash +sudo apt-get install uuid-dev +``` +