Adding support for QNX7.0.0

Change-Id: Id01e2880aa5cadc0e93a46b95fe675e1938051fa
Signed-off-by: Bartosz Taczała <bartosz.taczala@mobica.com>
pull/1029/head
Bartosz Taczała 7 years ago committed by Roger Light
parent eff8fab1b4
commit e86b27a2da

@ -11,8 +11,14 @@ endif (${WITH_SRV} STREQUAL ON)
add_executable(mosquitto_pub pub_client.c ${shared_src}) add_executable(mosquitto_pub pub_client.c ${shared_src})
add_executable(mosquitto_sub sub_client.c sub_client_output.c ${shared_src}) add_executable(mosquitto_sub sub_client.c sub_client_output.c ${shared_src})
target_link_libraries(mosquitto_pub libmosquitto) target_link_libraries(mosquitto_pub libmosquitto)
target_link_libraries(mosquitto_sub libmosquitto) target_link_libraries(mosquitto_sub libmosquitto)
if (QNX)
target_link_libraries(mosquitto_pub socket)
target_link_libraries(mosquitto_sub socket)
endif()
install(TARGETS mosquitto_pub RUNTIME DESTINATION "${BINDIR}" LIBRARY DESTINATION "${LIBDIR}") install(TARGETS mosquitto_pub RUNTIME DESTINATION "${BINDIR}" LIBRARY DESTINATION "${LIBDIR}")
install(TARGETS mosquitto_sub RUNTIME DESTINATION "${BINDIR}" LIBRARY DESTINATION "${LIBDIR}") install(TARGETS mosquitto_sub RUNTIME DESTINATION "${BINDIR}" LIBRARY DESTINATION "${LIBDIR}")

@ -21,6 +21,9 @@ Contributors:
#include <limits.h> #include <limits.h>
#ifdef WIN32 #ifdef WIN32
# include <ws2tcpip.h> # include <ws2tcpip.h>
#elif __QNX__
# include <sys/socket.h>
# include <netinet/in.h>
#else #else
# include <arpa/inet.h> # include <arpa/inet.h>
#endif #endif

@ -126,17 +126,18 @@ if (HAVE_GETADDRINFO_A)
endif (HAVE_GETADDRINFO_A) endif (HAVE_GETADDRINFO_A)
if (UNIX) if (UNIX)
if (APPLE) if (APPLE)
set (MOSQ_LIBS ${MOSQ_LIBS} dl m) set (MOSQ_LIBS ${MOSQ_LIBS} dl m)
else (APPLE) elseif(QNX)
set (MOSQ_LIBS ${MOSQ_LIBS} dl m) set(MOSQ_LIBS ${MOSQ_LIBS} m socket)
find_library(LIBRT rt) else(APPLE)
if (LIBRT) set (MOSQ_LIBS ${MOSQ_LIBS} dl m)
set (MOSQ_LIBS ${MOSQ_LIBS} rt) find_library(LIBRT rt)
endif (LIBRT) if (LIBRT)
endif (APPLE) set (MOSQ_LIBS ${MOSQ_LIBS} rt)
endif (LIBRT)
endif (APPLE)
endif (UNIX) endif (UNIX)
if (WIN32) if (WIN32)

@ -36,7 +36,7 @@ Contributors:
# include <ws2tcpip.h> # include <ws2tcpip.h>
#endif #endif
#if !defined(WIN32) && !defined(__CYGWIN__) #if !defined(WIN32) && !defined(__CYGWIN__) && !defined(__QNX__)
# include <sys/syslog.h> # include <sys/syslog.h>
#endif #endif

Loading…
Cancel
Save