| 12345678910111213141516171819202122232425262728293031 |
- # Smartbotic Database Client Library
- add_library(smartbotic-db-client STATIC
- src/client.cpp
- )
- target_include_directories(smartbotic-db-client PUBLIC
- $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
- $<INSTALL_INTERFACE:include>
- )
- # Link dependencies
- target_link_libraries(smartbotic-db-client PUBLIC
- smartbotic_db_proto
- )
- if(TARGET nlohmann_json::nlohmann_json)
- target_link_libraries(smartbotic-db-client PUBLIC nlohmann_json::nlohmann_json)
- else()
- target_include_directories(smartbotic-db-client PUBLIC ${NLOHMANN_JSON_INCLUDE_DIRS})
- endif()
- if(TARGET spdlog::spdlog)
- target_link_libraries(smartbotic-db-client PUBLIC spdlog::spdlog)
- else()
- target_link_libraries(smartbotic-db-client PUBLIC ${SPDLOG_LIBRARIES})
- target_include_directories(smartbotic-db-client PUBLIC ${SPDLOG_INCLUDE_DIRS})
- endif()
- # Export alias
- add_library(smartbotic::db-client ALIAS smartbotic-db-client)
|