From c9c8eeacf587b43a81e9e04165746a4e2a6339f0 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Thu, 23 Aug 2018 16:05:55 +0200 Subject: [PATCH] cmake: add spdlog via add_subdirectory() --- common/CMakeLists.txt | 4 ++++ common/lib/CMakeLists.txt | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index bc0057768..9b0f054ee 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -57,6 +57,10 @@ find_package(OpenSSL 1.0.0 REQUIRED) find_package(CURL 7.29 REQUIRED) find_package(Criterion) +set(SPDLOG_BUILD_EXAMPLES OFF) +set(SPDLOG_BUILD_TESTING OFF) +set(SPDLOG_BUILD_BENCH OFF) +add_subdirectory(thirdparty/spdlog) pkg_check_modules(JANSSON IMPORTED_TARGET REQUIRED jansson>=2.7) pkg_check_modules(LIBCONFIG IMPORTED_TARGET libconfig>=1.4.9) diff --git a/common/lib/CMakeLists.txt b/common/lib/CMakeLists.txt index 8cbbb2539..c87964d23 100644 --- a/common/lib/CMakeLists.txt +++ b/common/lib/CMakeLists.txt @@ -57,7 +57,6 @@ target_include_directories(villas-common PUBLIC ${CURL_INCLUDE_DIRS} ${PROJECT_BINARY_DIR}/include ${PROJECT_SOURCE_DIR}/include - ${PROJECT_SOURCE_DIR}/thirdparty/spdlog/include ) target_link_libraries(villas-common PUBLIC @@ -66,6 +65,7 @@ target_link_libraries(villas-common PUBLIC ${OPENSSL_LIBRARIES} ${CURL_LIBRARIES} ${CMAKE_DL_LIBS} + spdlog ) target_compile_definitions(villas-common PUBLIC