From 93167e39174c71e1da69208e040cc62bf7d257b9 Mon Sep 17 00:00:00 2001 From: Benjamin Sergeant Date: Sat, 26 Sep 2020 13:55:03 -0700 Subject: [PATCH] cmake / move FetchContent spdlog to a single place --- CMakeLists.txt | 7 ++++++- test/CMakeLists.txt | 9 +-------- ws/CMakeLists.txt | 7 ------- 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ef6246ea..c4e59be6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -251,7 +251,12 @@ if (USE_WS OR USE_TEST) add_subdirectory(ixsentry) add_subdirectory(ixbots) - # add_subdirectory(third_party/spdlog spdlog) + include(FetchContent) + FetchContent_Declare(spdlog + GIT_REPOSITORY "https://github.com/gabime/spdlog" + GIT_TAG "v1.8.0") + + FetchContent_MakeAvailable(spdlog) if (USE_WS) add_subdirectory(ws) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 6538a793..5e49714f 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -2,18 +2,11 @@ # Author: Benjamin Sergeant # Copyright (c) 2018 Machine Zone, Inc. All rights reserved. # -cmake_minimum_required (VERSION 3.4.1) +cmake_minimum_required (VERSION 3.14) project (ixwebsocket_unittest) set (CMAKE_CXX_STANDARD 14) -include(FetchContent) -FetchContent_Declare(spdlog - GIT_REPOSITORY "https://github.com/gabime/spdlog" - GIT_TAG "v1.8.0") - -FetchContent_MakeAvailable(spdlog) - option(USE_TLS "Add TLS support" ON) include_directories( diff --git a/ws/CMakeLists.txt b/ws/CMakeLists.txt index 9580ebd7..e05417d3 100644 --- a/ws/CMakeLists.txt +++ b/ws/CMakeLists.txt @@ -16,13 +16,6 @@ endif() set (CMAKE_CXX_STANDARD 14) -include(FetchContent) -FetchContent_Declare(spdlog - GIT_REPOSITORY "https://github.com/gabime/spdlog" - GIT_TAG "v1.8.0") - -FetchContent_MakeAvailable(spdlog) - option(USE_TLS "Add TLS support" ON) include_directories(ws .)