parent
f5f693876d
commit
9ec4351829
|
@ -27,7 +27,7 @@ if (NOT WIN32)
|
|||
target_compile_definitions(miniupnpc-private INTERFACE
|
||||
MINIUPNPC_SET_SOCKET_TIMEOUT
|
||||
_BSD_SOURCE _DEFAULT_SOURCE)
|
||||
if (NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
|
||||
if (NOT CMAKE_SYSTEM_NAME STREQUAL "Darwin" AND NOT CMAKE_SYSTEM_NAME STREQUAL "FreeBSD" AND NOT CMAKE_SYSTEM_NAME STREQUAL "SunOS")
|
||||
# add_definitions (-D_POSIX_C_SOURCE=200112L)
|
||||
target_compile_definitions(miniupnpc-private INTERFACE _XOPEN_SOURCE=600)
|
||||
endif ()
|
||||
|
@ -93,11 +93,12 @@ endif ()
|
|||
|
||||
if (WIN32)
|
||||
target_link_libraries(miniupnpc-private INTERFACE ws2_32 iphlpapi)
|
||||
#elseif (CMAKE_SYSTEM_NAME STREQUAL "Solaris")
|
||||
# find_library (SOCKET_LIBRARY NAMES socket)
|
||||
# find_library (NSL_LIBRARY NAMES nsl)
|
||||
# find_library (RESOLV_LIBRARY NAMES resolv)
|
||||
# set (LDLIBS ${SOCKET_LIBRARY} ${NSL_LIBRARY} ${RESOLV_LIBRARY} ${LDLIBS})
|
||||
elseif (CMAKE_SYSTEM_NAME STREQUAL "SunOS")
|
||||
target_link_libraries(miniupnpc-private INTERFACE socket nsl resolv)
|
||||
find_library (SOCKET_LIBRARY NAMES socket)
|
||||
find_library (NSL_LIBRARY NAMES nsl)
|
||||
find_library (RESOLV_LIBRARY NAMES resolv)
|
||||
set (LDLIBS ${SOCKET_LIBRARY} ${NSL_LIBRARY} ${RESOLV_LIBRARY} ${LDLIBS})
|
||||
elseif (HAIKU)
|
||||
target_link_libraries(miniupnpc-private INTERFACE network)
|
||||
find_library (SOCKET_LIBRARY NAMES network)
|
||||
|
|
|
@ -62,7 +62,7 @@ JNAERATORARGS = -mode StandaloneJar -runtime JNAerator -library miniupnpc
|
|||
#JNAERATORBASEURL = http://jnaerator.googlecode.com/files/
|
||||
JNAERATORBASEURL = https://repo1.maven.org/maven2/com/nativelibs4java/jnaerator/0.12
|
||||
|
||||
ifneq (, $(findstring sun, $(OS)))
|
||||
ifneq (, $(findstring sun, $(OS))$(findstring solaris, $(OS)))
|
||||
LDLIBS=-lsocket -lnsl -lresolv
|
||||
CFLAGS += -D__EXTENSIONS__
|
||||
CFLAGS += -std=c99
|
||||
|
|
Loading…
Reference in New Issue