File tree 1 file changed +5
-9
lines changed
1 file changed +5
-9
lines changed Original file line number Diff line number Diff line change @@ -24,10 +24,8 @@ else()
24
24
message (FATAL_ERROR "Invalid ${PROJECT_NAME} _OUTPUT_TYPE " ${${PROJECT_NAME} _OUTPUT_TYPE})
25
25
endif ()
26
26
27
-
28
27
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR} /cmake/" )
29
28
30
-
31
29
add_library (${PROJECT_NAME} ${LIB_TYPE}
32
30
Network.cpp
33
31
RTPacket.cpp
@@ -48,13 +46,11 @@ target_include_directories(${PROJECT_NAME}
48
46
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR} >/External/tinyxml2
49
47
)
50
48
51
- # Windows-specific linking
52
- if (WIN32 )
53
- target_link_libraries (${PROJECT_NAME}
54
- PUBLIC
55
- ws2_32 iphlpapi
56
- )
57
- endif ()
49
+ target_link_libraries (${PROJECT_NAME}
50
+ PUBLIC
51
+ $<$<STREQUAL :$<PLATFORM_ID>,Windows>:ws2_32>
52
+ $<$<STREQUAL :$<PLATFORM_ID>,Windows>:iphlpapi>
53
+ )
58
54
59
55
# Enable C++14
60
56
target_compile_features (${PROJECT_NAME} PUBLIC cxx_std_14)
You can’t perform that action at this time.
0 commit comments