Skip to content

Commit 4f127af

Browse files
committed
Fix warning build for windows warning LNK4044: unrecognized option '/lpthread'; ignored
1 parent b0ce247 commit 4f127af

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,11 @@ include_directories(${WSJCPP_INCLUDE_DIRS})
5050

5151
add_executable ("wsjcpp-yaml" ${WSJCPP_SOURCES})
5252

53-
target_link_libraries("wsjcpp-yaml" -lpthread ${WSJCPP_LIBRARIES} )
53+
if(WIN32)
54+
target_link_libraries("wsjcpp-yaml" ${WSJCPP_LIBRARIES} )
55+
else()
56+
target_link_libraries("wsjcpp-yaml" -lpthread ${WSJCPP_LIBRARIES} )
57+
endif()
5458

5559
install(
5660
TARGETS

0 commit comments

Comments
 (0)