CMakeLists.txt 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # Web server - smartbotic-server binary
  2. # Create library for webserver components
  3. add_library(smartbotic_webserver STATIC
  4. src/config.cpp
  5. src/http_server.cpp
  6. )
  7. target_include_directories(smartbotic_webserver
  8. PUBLIC
  9. $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
  10. $<INSTALL_INTERFACE:include>
  11. )
  12. target_compile_options(smartbotic_webserver PRIVATE ${SMARTBOTIC_CXX_WARNINGS})
  13. target_link_libraries(smartbotic_webserver
  14. PUBLIC
  15. smartbotic::common
  16. spdlog::spdlog
  17. nlohmann_json::nlohmann_json
  18. yaml-cpp::yaml-cpp
  19. Boost::beast
  20. Boost::asio
  21. )
  22. add_library(smartbotic::webserver ALIAS smartbotic_webserver)
  23. # Create the executable
  24. add_executable(smartbotic-server
  25. src/main.cpp
  26. )
  27. target_include_directories(smartbotic-server
  28. PRIVATE
  29. ${CMAKE_CURRENT_SOURCE_DIR}/include
  30. )
  31. target_compile_options(smartbotic-server PRIVATE ${SMARTBOTIC_CXX_WARNINGS})
  32. target_link_libraries(smartbotic-server
  33. PRIVATE
  34. smartbotic::webserver
  35. smartbotic::common
  36. smartbotic::proto
  37. spdlog::spdlog
  38. nlohmann_json::nlohmann_json
  39. sodium
  40. )