CMakeLists.txt 1020 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  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. )
  8. target_include_directories(smartbotic_database
  9. PUBLIC
  10. $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
  11. $<INSTALL_INTERFACE:include>
  12. )
  13. target_compile_options(smartbotic_database PRIVATE ${SMARTBOTIC_CXX_WARNINGS})
  14. target_link_libraries(smartbotic_database
  15. PUBLIC
  16. smartbotic::common
  17. spdlog::spdlog
  18. nlohmann_json::nlohmann_json
  19. )
  20. add_library(smartbotic::database ALIAS smartbotic_database)
  21. # Database service executable
  22. add_executable(smartbotic-db
  23. src/main.cpp
  24. )
  25. target_include_directories(smartbotic-db
  26. PRIVATE
  27. ${CMAKE_CURRENT_SOURCE_DIR}/include
  28. )
  29. target_compile_options(smartbotic-db PRIVATE ${SMARTBOTIC_CXX_WARNINGS})
  30. target_link_libraries(smartbotic-db
  31. PRIVATE
  32. smartbotic::database
  33. smartbotic::proto
  34. sodium
  35. )