From 150255033c4d4312ad16da83b7c4d0ad039f86ad Mon Sep 17 00:00:00 2001 From: yangwei Date: Tue, 22 Sep 2020 14:26:51 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7build(CMakeLists.txt):=20=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E9=93=BE=E6=8E=A5=E5=BA=93=E9=93=BE=E6=8E=A5pthread?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fb5c05f..a2258dc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -40,6 +40,7 @@ add_library(${lib_name}_shared SHARED src/MESA_handle_logger.c) target_link_libraries(${lib_name}_shared zlog_static) set_target_properties(${lib_name}_shared PROPERTIES LINK_FLAGS "-Wl,--version-script=${PROJECT_SOURCE_DIR}/src/version.map") +target_link_libraries(${lib_name}_shared pthread) if(DEFINED MESA_SHARED_INSTALL_DIR) set_target_properties(${lib_name}_shared PROPERTIES OUTPUT_NAME ${lib_name} LIBRARY_OUTPUT_DIRECTORY ${MESA_SHARED_INSTALL_DIR}) @@ -65,6 +66,6 @@ install(FILES inc/MESA_handle_logger.h DESTINATION ${CMAKE_INSTALL_PREFIX}/inc add_executable(${lib_name}_demo demo/test_handle_logger.c) -target_link_libraries(${lib_name}_demo rt pthread ${lib_name}_shared) +target_link_libraries(${lib_name}_demo pthread ${lib_name}_shared) include(Package)