CMakeLists.txt 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # Database service - smartbotic-db binary and storage library
  2. # Storage engine library
  3. add_library(smartbotic_database STATIC
  4. src/document.cpp
  5. src/collection.cpp
  6. src/collection_meta.cpp
  7. src/snapshot.cpp
  8. )
  9. target_include_directories(smartbotic_database
  10. PUBLIC
  11. $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
  12. $<INSTALL_INTERFACE:include>
  13. )
  14. target_compile_options(smartbotic_database PRIVATE ${SMARTBOTIC_CXX_WARNINGS})
  15. target_link_libraries(smartbotic_database
  16. PUBLIC
  17. smartbotic::common
  18. spdlog::spdlog
  19. nlohmann_json::nlohmann_json
  20. )
  21. add_library(smartbotic::database ALIAS smartbotic_database)
  22. # Database service executable
  23. add_executable(smartbotic-db
  24. src/main.cpp
  25. )
  26. target_include_directories(smartbotic-db
  27. PRIVATE
  28. ${CMAKE_CURRENT_SOURCE_DIR}/include
  29. )
  30. target_compile_options(smartbotic-db PRIVATE ${SMARTBOTIC_CXX_WARNINGS})
  31. target_link_libraries(smartbotic-db
  32. PRIVATE
  33. smartbotic::database
  34. smartbotic::proto
  35. sodium
  36. )