Changed includes

This commit is contained in:
2020-08-17 08:49:54 +02:00
parent 213da9e432
commit 730a387f96
3 changed files with 8 additions and 8 deletions

View File

@@ -4,15 +4,14 @@ project(thrawn)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_EXPORT_COMPILE_COMMANDS true)
include_directories("/usr/local/include")
include_directories("/usr/local/include/mqttpp-0.1")
link_directories("/usr/local/lib/mqttpp-0.1")
include_directories("lib/mqtt++/include")
find_package(spdlog CONFIG REQUIRED)
find_package(OpenSSL REQUIRED)
include(FindLua)
find_package(lua REQUIRED)
find_package(eclipse-paho-mqtt-c CONFIG REQUIRED)
add_executable(thrawn src/main.cpp src src/thrawn_api.cpp src/Service.cpp src/Cache.cpp src/LuaEngine.cpp)
target_link_libraries(thrawn ${LIBS} spdlog::spdlog ${LUA_LIBRARIES} mqttpp)
add_executable(thrawn src/main.cpp src src/thrawn_api.cpp src/Service.cpp src/Cache.cpp src/LuaEngine.cpp lib/mqtt++/src/mqtt++.cpp)
target_link_libraries(thrawn ${LIBS} spdlog::spdlog ${LUA_LIBRARIES} OpenSSL::SSL eclipse-paho-mqtt-c::paho-mqtt3cs-static)
target_include_directories(thrawn PRIVATE ${LUA_INCLUDE_DIR})
install(TARGETS thrawn DESTINATION bin)

View File

@@ -3,7 +3,6 @@
#include <string>
#include "Service.h"
#include "thrawn_api.h"
#include "mqttpp.h"
#include "spdlog/spdlog.h"
#include "Cache.h"
#include "LuaEngine.h"
@@ -11,6 +10,7 @@
#include "Version.h"
#include <cstring>
#include <thread>
#include "mqtt++.h"
std::vector<std::string> lua_scripts_in_folder(const std::string& path_str) {
std::vector<std::string> scripts;
@@ -35,6 +35,7 @@ int main(int argc, char* argv[]) {
std::string mqttServerURI = "tcp://chimaera:1883";
mqttpp::LastWill last_will {"dev/thrawn/status", "0"};
std::string version_topic = "dev/thrawn/version";
std::string version_topic_value = std::to_string(THRAWN_MAJOR_VERSION) + "." + std::to_string(THRAWN_MINOR_VERSION) + "." + std::to_string(THRAWN_PATCH_VERSION);
std::string lastWillConnected = "1";