Changeset View
Changeset View
Standalone View
Standalone View
src/CMakeLists.txt
Show First 20 Lines • Show All 522 Lines • ▼ Show 20 Lines | if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Windows") | ||||
target_link_libraries(server Event::pthreads) | target_link_libraries(server Event::pthreads) | ||||
endif() | endif() | ||||
if(ENABLE_UPNP) | if(ENABLE_UPNP) | ||||
find_package(MiniUPnPc 1.5 REQUIRED) | find_package(MiniUPnPc 1.5 REQUIRED) | ||||
target_link_libraries(server MiniUPnPc::miniupnpc) | target_link_libraries(server MiniUPnPc::miniupnpc) | ||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") | if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") | ||||
find_library(IPHLPAPI_LIBRARY NAMES iphlpapi) | # TODO: check if we are really using a static library. Assume this is | ||||
if(NOT IPHLPAPI_LIBRARY) | # the one from the depends for now since the native windows build is not | ||||
message(FATAL_ERROR "Lib iphlpapi is missing") | # supported. | ||||
endif() | |||||
target_link_libraries(server ${IPHLPAPI_LIBRARY}) | |||||
target_compile_definitions(server | target_compile_definitions(server | ||||
PUBLIC -DSTATICLIB | PUBLIC -DSTATICLIB | ||||
PUBLIC -DMINIUPNP_STATICLIB | PUBLIC -DMINIUPNP_STATICLIB | ||||
) | ) | ||||
endif() | endif() | ||||
endif() | endif() | ||||
# Test suite. | # Test suite. | ||||
▲ Show 20 Lines • Show All 78 Lines • Show Last 20 Lines |