20 lines
528 B
CMake
20 lines
528 B
CMake
cmake_minimum_required(VERSION 3.10)
|
|
project(mqttExplorer)
|
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
|
|
#PAHO-MQTT-C Library
|
|
#USUALLY INSTALLED TO /usr/local/include /usr/local/lib and /usr/local/bin
|
|
include_directories(/usr/local/include)
|
|
link_directories(/usr/local/lib)
|
|
set(LIBS ${LIBS} paho-mqtt3cs)
|
|
|
|
find_package(spdlog CONFIG REQUIRED)
|
|
find_package(ZLIB REQUIRED)
|
|
|
|
add_executable(mqttExplorer src/main.cpp src/MQTT.cpp)
|
|
|
|
target_link_libraries(mqttExplorer ${LIBS} spdlog::spdlog ZLIB::ZLIB)
|
|
|
|
install(TARGETS mqttExplorer DESTINATION bin)
|