From d154e7b38e7e61d342a307c43e8594da877d845d Mon Sep 17 00:00:00 2001 From: tqcq Date: Wed, 13 Dec 2023 13:17:23 +0800 Subject: [PATCH] fix build shared library failed --- CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4f63f0c..9b3d153 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,7 +12,9 @@ set(CMAKE_POSITION_INDEPENDENT_CODE ON) if (ULIB_SHARED_LIB) add_library(${PROJECT_NAME} SHARED "") else() - add_library(${PROJECT_NAME} STATIC "" + add_library(${PROJECT_NAME} STATIC "") +endif() +target_sources(${PROJECT_NAME} PRIVATE src/ulib/concorrency/mutex.cpp src/ulib/concorrency/mutex.h src/ulib/concorrency/condition_variable.cpp @@ -23,7 +25,6 @@ else() src/ulib/concorrency/internal/condition_variable_impl.h src/ulib/concorrency/event.cpp src/ulib/concorrency/event.h) -endif() find_package(Threads REQUIRED) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")