mosquitto/client/CMakeLists.txt
Bartosz Taczała e86b27a2da Adding support for QNX7.0.0
Change-Id: Id01e2880aa5cadc0e93a46b95fe675e1938051fa
Signed-off-by: Bartosz Taczała <bartosz.taczala@mobica.com>
2018-11-06 23:11:09 +00:00

25 lines
864 B
CMake

include_directories(${mosquitto_SOURCE_DIR} ${mosquitto_SOURCE_DIR}/lib
${STDBOOL_H_PATH} ${STDINT_H_PATH} ${PTHREAD_INCLUDE_DIR})
link_directories(${mosquitto_BINARY_DIR}/lib)
set(shared_src client_shared.c client_shared.h)
if (${WITH_SRV} STREQUAL ON)
add_definitions("-DWITH_SRV")
endif (${WITH_SRV} STREQUAL ON)
add_executable(mosquitto_pub pub_client.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_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_sub RUNTIME DESTINATION "${BINDIR}" LIBRARY DESTINATION "${LIBDIR}")