CMakeLists.txt 933 B

1234567891011121314151617181920212223242526
  1. cmake_minimum_required(VERSION 3.15)
  2. project(tsdb CXX)
  3. set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
  4. find_package(clickhouse-cpp REQUIRED)
  5. find_package(spdlog REQUIRED)
  6. find_package(yaml-cpp REQUIRED)
  7. find_package(nlohmann_json REQUIRED)
  8. find_package(fmt REQUIRED)
  9. find_package(zstd REQUIRED)
  10. find_package(sole REQUIRED)
  11. add_library(tsdb src/tsdb.cpp src/tsdb_hf.cpp src/shared.cpp)
  12. target_include_directories(tsdb PUBLIC include)
  13. set_target_properties(tsdb PROPERTIES PUBLIC_HEADER "include/tsdb.h;include/tsdb_hf.h")
  14. target_link_libraries(tsdb PRIVATE clickhouse-cpp-lib::clickhouse-cpp-lib)
  15. target_link_libraries(tsdb PRIVATE spdlog::spdlog)
  16. target_link_libraries(tsdb PRIVATE yaml-cpp::yaml-cpp)
  17. target_link_libraries(tsdb PRIVATE nlohmann_json::nlohmann_json)
  18. target_link_libraries(tsdb PRIVATE fmt::fmt)
  19. target_link_libraries(tsdb PRIVATE zstd::libzstd_static)
  20. target_link_libraries(tsdb PRIVATE sole::sole)
  21. install(TARGETS tsdb)