CMakeLists.txt 1.9 KB

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