From 5bbec4d1bf8df2b5684dfc0c5b98591806346336 Mon Sep 17 00:00:00 2001 From: springzfx Date: Sat, 30 May 2020 02:37:45 +0800 Subject: [PATCH] remove pthread.h, use CMAKE_DL_LIBS --- src/CMakeLists.txt | 2 +- src/cgproxyd.hpp | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 72012a6..ebb7d61 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -12,7 +12,7 @@ endif() add_executable(main main.cpp common.cpp config.cpp cgroup_attach.cpp socket_client.cpp socket_server.cpp) -target_link_libraries(main PRIVATE nlohmann_json::nlohmann_json Threads::Threads dl) +target_link_libraries(main PRIVATE nlohmann_json::nlohmann_json Threads::Threads ${CMAKE_DL_LIBS}) set_target_properties(main PROPERTIES LINKER_LANGUAGE CXX) set_target_properties(main PROPERTIES OUTPUT_NAME cgproxy) diff --git a/src/cgproxyd.hpp b/src/cgproxyd.hpp index cc6abc2..25c901f 100644 --- a/src/cgproxyd.hpp +++ b/src/cgproxyd.hpp @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include