File tree Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Expand file tree Collapse file tree 2 files changed +9
-9
lines changed Original file line number Diff line number Diff line change 1
1
cmake_minimum_required (VERSION 3.0 )
2
2
3
- project (wsjcpp-validators )
3
+ project (wsjcpp-validators C CXX )
4
+
5
+ find_package (Threads REQUIRED )
4
6
5
7
include (${CMAKE_CURRENT_SOURCE_DIR} /src.wsjcpp/CMakeLists.txt )
6
8
@@ -20,11 +22,11 @@ include_directories(${WSJCPP_INCLUDE_DIRS})
20
22
21
23
add_executable ("wsjcpp-validators" ${WSJCPP_SOURCES} )
22
24
23
- target_link_libraries ("wsjcpp-validators" -lpthread ${WSJCPP_LIBRARIES } )
25
+ target_link_libraries ("wsjcpp-validators" ${CMAKE_THREAD_LIBS_INIT } )
24
26
25
27
install (
26
28
TARGETS
27
29
"wsjcpp-validators"
28
30
RUNTIME DESTINATION
29
31
/usr/bin
30
- )
32
+ )
Original file line number Diff line number Diff line change 1
1
# Automaticly generated by [email protected]
2
2
cmake_minimum_required (VERSION 3.0 )
3
3
4
- project (unit-tests )
4
+ project (unit-tests C CXX )
5
+
6
+ find_package (Threads REQUIRED )
5
7
6
8
if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" )
7
9
set (MACOSX TRUE )
@@ -58,15 +60,11 @@ list (APPEND WSJCPP_SOURCES "../unit-tests.wsjcpp/src/unit_test_is_valid_ip_v4.c
58
60
list (APPEND WSJCPP_SOURCES "../unit-tests.wsjcpp/src/unit_test_is_valid_ip_v6.h" )
59
61
list (APPEND WSJCPP_SOURCES "../unit-tests.wsjcpp/src/unit_test_is_valid_ip_v6.cpp" )
60
62
61
- # required-libraries
62
- list (APPEND WSJCPP_LIBRARIES "-lpthread" )
63
-
64
-
65
63
include_directories (${WSJCPP_INCLUDE_DIRS} )
66
64
67
65
add_executable ("unit-tests" ${WSJCPP_SOURCES} )
68
66
69
- target_link_libraries ("unit-tests" -lpthread ${WSJCPP_LIBRARIES } )
67
+ target_link_libraries ("unit-tests" ${CMAKE_THREAD_LIBS_INIT } )
70
68
71
69
install (
72
70
TARGETS
You can’t perform that action at this time.
0 commit comments