CMakeLists.txt 2.0 KB

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