Skip to content

Commit b8bce0f

Browse files
Merged master.
2 parents a31dbbf + bd7819f commit b8bce0f

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

CMakeLists.txt

+5-9
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,8 @@ else()
2424
message(FATAL_ERROR "Invalid ${PROJECT_NAME}_OUTPUT_TYPE " ${${PROJECT_NAME}_OUTPUT_TYPE})
2525
endif()
2626

27-
2827
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
2928

30-
3129
add_library(${PROJECT_NAME} ${LIB_TYPE}
3230
Network.cpp
3331
RTPacket.cpp
@@ -48,13 +46,11 @@ target_include_directories(${PROJECT_NAME}
4846
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>/External/tinyxml2
4947
)
5048

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+
)
5854

5955
# Enable C++14
6056
target_compile_features(${PROJECT_NAME} PUBLIC cxx_std_14)

0 commit comments

Comments
 (0)