From a95f413c6135b30b3658e56b708d32395a7c0dee Mon Sep 17 00:00:00 2001 From: "Kevin M. Godby" Date: Wed, 4 May 2016 23:39:10 -0500 Subject: [PATCH] Make vendor targets optional. --- vendor/CMakeLists.txt | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/vendor/CMakeLists.txt b/vendor/CMakeLists.txt index 86b7e33b..a391b907 100644 --- a/vendor/CMakeLists.txt +++ b/vendor/CMakeLists.txt @@ -5,20 +5,21 @@ # Most of these libraries are used for running comparison benchmarks against # other logging libraries. -add_subdirectory(zf_log) +if(IS_DIRECTORY zf_log) + add_subdirectory(zf_log) +endif() -add_subdirectory(glog) +if(IS_DIRECTORY glog) + add_subdirectory(glog) +endif() -add_library(easylogging INTERFACE) -set(SPDLOG_VENDORED_EASYLOGGING_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/easyloggingpp" CACHE INTERNAL "" FORCE) -target_include_directories(easylogging INTERFACE "${SPDLOG_VENDORED_EASYLOGGING_ROOT}/src") - -add_subdirectory(g3log) - - -#add_library(zflog INTERFACE) -#set(SPDLOG_VENDORED_ZFLOG_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/zf_log" CACHE INTERNAL "" FORCE) -#target_include_directories(zflog INTERFACE "${SPDLOG_VENDORED_ZFLOG_ROOT}/zf_log") -##target_compile_definitions(zflog INTERFACE ZFLOG_DEFINITIONS) +if(IS_DIRECTORY easyloggingpp) + add_library(easylogging INTERFACE) + set(SPDLOG_VENDORED_EASYLOGGING_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/easyloggingpp" CACHE INTERNAL "" FORCE) + target_include_directories(easylogging INTERFACE "${SPDLOG_VENDORED_EASYLOGGING_ROOT}/src") +endif() +if(IS_DIRECTORY g3log) + add_subdirectory(g3log) +endif()