diff options
| author | chenzizhan <[email protected]> | 2024-10-24 17:09:27 +0800 |
|---|---|---|
| committer | chenzizhan <[email protected]> | 2024-10-24 17:09:27 +0800 |
| commit | 8110a85be1cde0f3a2d9ce9080e743791047efd6 (patch) | |
| tree | f06345ca3640b4336f9e631c980c47f902a34ef9 /CMakeLists.txt | |
| parent | ff2357bb1d2af70dda26029ae02f62ef42d96ac2 (diff) | |
Revert "Revert "uuid type field(dimension)""HEADv4.7.0develop-version4
This reverts commit 328afefa85448339bfecc3ad5b429957eb12566c.
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 9a30f66..45aa8a7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,12 +10,12 @@ set(lib_name fieldstat4) project (${lib_name})
-# to fix issue: cannot find pthresh
-# set(CMAKE_THREAD_LIBS_INIT "-lpthread")
-# set(CMAKE_HAVE_THREADS_LIBRARY 1)
-# set(CMAKE_USE_WIN32_THREADS_INIT 0)
-# set(CMAKE_USE_PTHREADS_INIT 1)
-# set(THREADS_PREFER_PTHREAD_FLAG ON)
+find_library(UUID_LIB uuid)
+if(UUID_LIB)
+ message(STATUS "Found UUID library: ${UUID_LIB}")
+else()
+ message(FATAL_ERROR "Could not find the UUID library. Please install libuuid.")
+endif()
set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
include(Version)
@@ -127,6 +127,8 @@ add_subdirectory(ctest) # Shared Library Output
add_library(${lib_name}_shared SHARED ${SRC})
+target_link_libraries(${lib_name}_shared ${UUID_LIB})
+
set_target_properties(${lib_name}_shared PROPERTIES LINK_FLAGS
"-Wl,--version-script=${PROJECT_SOURCE_DIR}/src/version.map")
if(DEFINED MESA_SHARED_INSTALL_DIR)
@@ -137,6 +139,7 @@ endif() # static Library Output
add_library(${lib_name}_static STATIC ${SRC})
+target_link_libraries(${lib_name}_static ${UUID_LIB})
set_target_properties(${lib_name}_static PROPERTIES OUTPUT_NAME ${lib_name})
install(TARGETS ${lib_name}_shared LIBRARY DESTINATION ${CMAKE_INSTALL_PREFIX}/lib COMPONENT LIBRARIES)
|
