fix cross-build to iOS/tvOS/watchOS
This commit is contained in:
parent
6f848ae082
commit
da771539c1
|
@ -29,7 +29,7 @@ if (NOT WIN32)
|
||||||
target_compile_definitions(miniupnpc-private INTERFACE
|
target_compile_definitions(miniupnpc-private INTERFACE
|
||||||
MINIUPNPC_SET_SOCKET_TIMEOUT
|
MINIUPNPC_SET_SOCKET_TIMEOUT
|
||||||
_BSD_SOURCE _DEFAULT_SOURCE)
|
_BSD_SOURCE _DEFAULT_SOURCE)
|
||||||
if (NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND NOT CMAKE_SYSTEM_NAME STREQUAL "SunOS")
|
if (NOT APPLE AND NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND NOT CMAKE_SYSTEM_NAME STREQUAL "SunOS")
|
||||||
# add_definitions (-D_POSIX_C_SOURCE=200112L)
|
# add_definitions (-D_POSIX_C_SOURCE=200112L)
|
||||||
target_compile_definitions(miniupnpc-private INTERFACE _XOPEN_SOURCE=600)
|
target_compile_definitions(miniupnpc-private INTERFACE _XOPEN_SOURCE=600)
|
||||||
endif ()
|
endif ()
|
||||||
|
@ -37,7 +37,7 @@ else ()
|
||||||
target_compile_definitions(miniupnpc-private INTERFACE _WIN32_WINNT=0x0501) # XP or higher for getnameinfo and friends
|
target_compile_definitions(miniupnpc-private INTERFACE _WIN32_WINNT=0x0501) # XP or higher for getnameinfo and friends
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
if (APPLE)
|
||||||
target_compile_definitions(miniupnpc-private INTERFACE _DARWIN_C_SOURCE)
|
target_compile_definitions(miniupnpc-private INTERFACE _DARWIN_C_SOURCE)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue