diff options
Diffstat (limited to 'apps/CMakeLists.txt')
-rw-r--r-- | apps/CMakeLists.txt | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/apps/CMakeLists.txt b/apps/CMakeLists.txt index 411eb32..34fbd30 100644 --- a/apps/CMakeLists.txt +++ b/apps/CMakeLists.txt @@ -13,6 +13,7 @@ list(APPEND INCLUDE_DIRECTORIES ${CMAKE_CURRENT_SOURCE_DIR} "${PROJECT_SOURCE_DIR}/include" "${PROJECT_SOURCE_DIR}/json/src" + "${PROJECT_SOURCE_DIR}/gsl/include" "${PROJECT_SOURCE_DIR}/sensor/include") #### Find all packages @@ -67,14 +68,12 @@ list(APPEND LIBRARIES "${LOG4CPLUS_LIBRARY}") # mosquitto find_header_and_lib(MOSQUITTO mosquitto.h mosquitto) -find_header_and_lib(MOSQUITTOPP mosquittopp.h mosquittopp) -if(MOSQUITTO_OK STREQUAL "OK" AND MOSQUITTOPP_OK STREQUAL "OK") +if(MOSQUITTO_OK STREQUAL "OK") list(APPEND APPS mqtt-publish) + set(mqtt-publish_SOURCES mqtt_support.cpp mqtt_support.h) list(APPEND INCLUDE_DIRECTORIES "${MOSQUITTO_INCLUDE_DIRECTORY}") - list(APPEND INCLUDE_DIRECTORIES "${MOSQUITTOPP_INCLUDE_DIRECTORY}") list(APPEND LIBRARIES "${MOSQUITTO_LIBRARY}") - list(APPEND LIBRARIES "${MOSQUITTOPP_LIBRARY}") else() message(STATUS "Not adding MQTT applications, missing header and/or library files") endif() @@ -90,7 +89,7 @@ add_library(apps OBJECT target_include_directories(apps PUBLIC ${INCLUDE_DIRECTORIES}) foreach(app ${APPS}) - add_executable(${app} ${app}.cpp $<TARGET_OBJECTS:apps>) + add_executable(${app} ${app}.cpp $<TARGET_OBJECTS:apps> ${${app}_SOURCES}) target_include_directories(${app} PUBLIC ${INCLUDE_DIRECTORIES}) |