mosquitto/client/CMakeLists.txt

35 lines
1.3 KiB
CMake
Raw Normal View History

include_directories(${mosquitto_SOURCE_DIR} ${mosquitto_SOURCE_DIR}/lib
2019-02-06 12:23:27 +00:00
${STDBOOL_H_PATH} ${STDINT_H_PATH} ${PTHREAD_INCLUDE_DIR}
${OPENSSL_INCLUDE_DIR})
2014-05-07 22:27:00 +00:00
link_directories(${mosquitto_BINARY_DIR}/lib)
2018-10-31 12:38:39 +00:00
set(shared_src client_shared.c client_shared.h client_props.c)
2014-05-25 10:02:31 +00:00
if (WITH_SRV)
add_definitions("-DWITH_SRV")
endif (WITH_SRV)
add_executable(mosquitto_pub pub_client.c pub_shared.c ${shared_src})
add_executable(mosquitto_sub sub_client.c sub_client_output.c ${shared_src})
2019-04-17 09:39:51 +00:00
add_executable(mosquitto_rr rr_client.c pub_shared.c sub_client_output.c ${shared_src})
2014-05-07 22:27:00 +00:00
if (WITH_STATIC_LIBRARIES)
target_link_libraries(mosquitto_pub libmosquitto_static)
target_link_libraries(mosquitto_sub libmosquitto_static)
target_link_libraries(mosquitto_rr libmosquitto_static)
else()
target_link_libraries(mosquitto_pub libmosquitto)
target_link_libraries(mosquitto_sub libmosquitto)
target_link_libraries(mosquitto_rr libmosquitto)
endif()
2014-05-07 22:27:00 +00:00
if (QNX)
target_link_libraries(mosquitto_pub socket)
target_link_libraries(mosquitto_sub socket)
target_link_libraries(mosquitto_rr socket)
endif()
install(TARGETS mosquitto_pub RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
install(TARGETS mosquitto_sub RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
install(TARGETS mosquitto_rr RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")