mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-11 08:20:18 -06:00
libuv: Add support for building for QNX within CMake
This commit is contained in:
@@ -5,7 +5,8 @@
|
||||
// POSIX APIs are needed
|
||||
# define _POSIX_C_SOURCE 200809L
|
||||
#endif
|
||||
#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
|
||||
#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) || \
|
||||
defined(__QNX__)
|
||||
// For isascii
|
||||
# define _XOPEN_SOURCE 700
|
||||
#endif
|
||||
|
||||
@@ -5,7 +5,8 @@
|
||||
// POSIX APIs are needed
|
||||
# define _POSIX_C_SOURCE 200809L
|
||||
#endif
|
||||
#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__)
|
||||
#if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__NetBSD__) || \
|
||||
defined(__QNX__)
|
||||
// For isascii
|
||||
# define _XOPEN_SOURCE 700
|
||||
#endif
|
||||
|
||||
@@ -336,6 +336,24 @@ if(CMAKE_SYSTEM_NAME STREQUAL "HP-UX")
|
||||
)
|
||||
endif()
|
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "QNX")
|
||||
list(APPEND uv_headers
|
||||
include/uv/posix.h
|
||||
)
|
||||
list(APPEND uv_defines
|
||||
_XOPEN_SOURCE=700
|
||||
)
|
||||
list(APPEND uv_sources
|
||||
src/unix/posix-hrtime.c
|
||||
src/unix/posix-poll.c
|
||||
src/unix/no-fsevents.c
|
||||
src/unix/no-proctitle.c
|
||||
)
|
||||
list(APPEND uv_libraries
|
||||
socket
|
||||
)
|
||||
endif()
|
||||
|
||||
include_directories(
|
||||
${uv_includes}
|
||||
${KWSYS_HEADER_ROOT}
|
||||
|
||||
@@ -1675,6 +1675,10 @@ else
|
||||
uv_c_flags="${uv_c_flags} -D__EXTENSIONS__ -D_XOPEN_SOURCE=600"
|
||||
libs="${libs} -lkstat -lnsl -lsendfile -lsocket -lrt"
|
||||
;;
|
||||
*QNX*)
|
||||
uv_c_flags="${uv_c_flags} -D_XOPEN_SOURCE=700"
|
||||
libs="${libs} -lsocket"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
if test "x${bootstrap_system_libuv}" = "x"; then
|
||||
|
||||
Reference in New Issue
Block a user