CMakeLists.txt 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. # Web server - smartbotic-server binary
  2. # Use relaxed warnings for webserver (it includes gRPC headers which use __int128)
  3. set(SMARTBOTIC_WEBSERVER_WARNINGS
  4. -Wall
  5. -Wextra
  6. -Werror
  7. -Wno-unused-parameter
  8. -Wno-dangling-reference
  9. -Wno-pedantic # Required for abseil __int128 support
  10. -Wno-overflow # Required for abseil hash_set.h
  11. )
  12. # Create library for webserver components
  13. add_library(smartbotic_webserver STATIC
  14. src/config.cpp
  15. src/http_server.cpp
  16. src/database_client.cpp
  17. src/llm_client.cpp
  18. src/auth_service.cpp
  19. src/user_service.cpp
  20. src/workspace_service.cpp
  21. src/group_service.cpp
  22. src/membership_service.cpp
  23. src/api_key_service.cpp
  24. src/collection_service.cpp
  25. src/document_service.cpp
  26. src/ws_handler.cpp
  27. src/view_service.cpp
  28. src/page_service.cpp
  29. src/permissions.cpp
  30. src/authorization_service.cpp
  31. src/tool_service.cpp
  32. src/archive_service.cpp
  33. src/event_manager.cpp
  34. src/script_service.cpp
  35. )
  36. target_include_directories(smartbotic_webserver
  37. PUBLIC
  38. $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
  39. $<INSTALL_INTERFACE:include>
  40. )
  41. target_compile_options(smartbotic_webserver PRIVATE ${SMARTBOTIC_WEBSERVER_WARNINGS})
  42. target_link_libraries(smartbotic_webserver
  43. PUBLIC
  44. smartbotic::common
  45. smartbotic::proto
  46. smartbotic::runner
  47. spdlog::spdlog
  48. nlohmann_json::nlohmann_json
  49. httplib::httplib
  50. PkgConfig::LWS
  51. OpenSSL::SSL
  52. OpenSSL::Crypto
  53. jwt-cpp::jwt-cpp
  54. )
  55. add_library(smartbotic::webserver ALIAS smartbotic_webserver)
  56. # Create the executable
  57. add_executable(smartbotic-crm-webserver
  58. src/main.cpp
  59. )
  60. target_include_directories(smartbotic-crm-webserver
  61. PRIVATE
  62. ${CMAKE_CURRENT_SOURCE_DIR}/include
  63. )
  64. target_compile_options(smartbotic-crm-webserver PRIVATE ${SMARTBOTIC_WEBSERVER_WARNINGS})
  65. target_link_libraries(smartbotic-crm-webserver
  66. PRIVATE
  67. smartbotic::webserver
  68. smartbotic::common
  69. smartbotic::proto
  70. spdlog::spdlog
  71. nlohmann_json::nlohmann_json
  72. )