remove pthread.h, use CMAKE_DL_LIBS

This commit is contained in:
springzfx
2020-05-30 02:37:45 +08:00
parent 9b4ec44897
commit 5bbec4d1bf
2 changed files with 1 additions and 2 deletions

View File

@@ -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)

View File

@@ -15,7 +15,6 @@
#include <functional>
#include <future>
#include <nlohmann/json.hpp>
#include <pthread.h>
#include <sched.h>
#include <sys/file.h>
#include <unistd.h>