CMakeLists.txt 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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. )
  35. target_include_directories(smartbotic_webserver
  36. PUBLIC
  37. $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
  38. $<INSTALL_INTERFACE:include>
  39. )
  40. target_compile_options(smartbotic_webserver PRIVATE ${SMARTBOTIC_WEBSERVER_WARNINGS})
  41. target_link_libraries(smartbotic_webserver
  42. PUBLIC
  43. smartbotic::common
  44. smartbotic::proto
  45. spdlog::spdlog
  46. nlohmann_json::nlohmann_json
  47. httplib::httplib
  48. PkgConfig::LWS
  49. OpenSSL::SSL
  50. OpenSSL::Crypto
  51. jwt-cpp::jwt-cpp
  52. )
  53. add_library(smartbotic::webserver ALIAS smartbotic_webserver)
  54. # Create the executable
  55. add_executable(smartbotic-crm-webserver
  56. src/main.cpp
  57. )
  58. target_include_directories(smartbotic-crm-webserver
  59. PRIVATE
  60. ${CMAKE_CURRENT_SOURCE_DIR}/include
  61. )
  62. target_compile_options(smartbotic-crm-webserver PRIVATE ${SMARTBOTIC_WEBSERVER_WARNINGS})
  63. target_link_libraries(smartbotic-crm-webserver
  64. PRIVATE
  65. smartbotic::webserver
  66. smartbotic::common
  67. smartbotic::proto
  68. spdlog::spdlog
  69. nlohmann_json::nlohmann_json
  70. )