From bea505577b2e8eb0171738c545663c930aa952a2 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Mon, 14 Jan 2019 14:19:13 +0100 Subject: [PATCH] cmake: move thirdparty CMakeLists to subfolder --- common/CMakeLists.txt | 12 +----------- common/thirdparty/CMakeLists.txt | 14 ++++++++++++++ 2 files changed, 15 insertions(+), 11 deletions(-) create mode 100644 common/thirdparty/CMakeLists.txt diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 2271152b7..e04607e61 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -58,17 +58,7 @@ find_package(OpenSSL 1.0.0 REQUIRED) find_package(CURL 7.29 REQUIRED) find_package(Criterion) -set(SPDLOG_BUILD_EXAMPLES OFF CACHE BOOL "Build examples" FORCE) -set(SPDLOG_BUILD_TESTING OFF CACHE BOOL "Build spdlog tests" FORCE) -set(SPDLOG_BUILD_BENCH OFF CACHE BOOL "Build spdlog benchmarks" FORCE) -add_subdirectory(thirdparty/spdlog) - -set(FMT_DOC OFF CACHE BOOL "Generate the doc target." FORCE) -set(FMT_INSTALL OFF CACHE BOOL "Generate the install target." FORCE) -set(FMT_TEST OFF CACHE BOOL "Generate the test target." FORCE) -add_subdirectory(thirdparty/fmtlib) - -target_compile_options(fmt PUBLIC -fPIC) +add_subdirectory(thirdparty) pkg_check_modules(JANSSON IMPORTED_TARGET REQUIRED jansson>=2.7) pkg_check_modules(LIBCONFIG IMPORTED_TARGET libconfig>=1.4.9) diff --git a/common/thirdparty/CMakeLists.txt b/common/thirdparty/CMakeLists.txt new file mode 100644 index 000000000..d5ac9d5ee --- /dev/null +++ b/common/thirdparty/CMakeLists.txt @@ -0,0 +1,14 @@ +# We dont want to install the spdlog headers +#set_directory_properties(PROPERTIES EXCLUDE_FROM_ALL ON) + +set(SPDLOG_BUILD_EXAMPLES OFF CACHE BOOL "Build examples" FORCE) +set(SPDLOG_BUILD_TESTING OFF CACHE BOOL "Build spdlog tests" FORCE) +set(SPDLOG_BUILD_BENCH OFF CACHE BOOL "Build spdlog benchmarks" FORCE) +add_subdirectory(spdlog) + +set(FMT_DOC OFF CACHE BOOL "Generate the doc target." FORCE) +set(FMT_INSTALL OFF CACHE BOOL "Generate the install target." FORCE) +set(FMT_TEST OFF CACHE BOOL "Generate the test target." FORCE) +add_subdirectory(fmtlib) + +target_compile_options(fmt PUBLIC -fPIC)