From cea75e7f6a76178a9bb1bccb4dd439a3276d3872 Mon Sep 17 00:00:00 2001 From: Jorrit Wronski Date: Wed, 15 Nov 2017 13:23:37 +0100 Subject: [PATCH] Conditionally include hunter gate --- CMakeLists.txt | 20 +++++++++++--------- test/CMakeLists.txt | 12 +++++++----- 2 files changed, 18 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1d411c5..973dd39 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,11 +9,13 @@ option(BUILD_UNIT_TESTS "Build the unit tests" ON) ## HUNTER ## option(HUNTER_ENABLED "Use hunter to manage dependencies" OFF) -include("cmake/HunterGate.cmake") -HunterGate( - URL "https://github.com/ruslo/hunter/archive/v0.19.156.tar.gz" - SHA1 "8d5e4635b137365e0d1ade4d60accf4e2bb41f0d" -) +if(HUNTER_ENABLED) + include("cmake/HunterGate.cmake") + HunterGate( + URL "https://github.com/ruslo/hunter/archive/v0.19.156.tar.gz" + SHA1 "8d5e4635b137365e0d1ade4d60accf4e2bb41f0d" + ) +endif() ## ## PROJECT @@ -55,10 +57,10 @@ if(HUNTER_ENABLED) # Use Hunter to manage dependencies # Add dependencies to target target_link_libraries(inja INTERFACE nlohmann_json) else() - #target_include_directories(inja INTERFACE - # $ - # $ - #) + target_include_directories(inja INTERFACE + $ + $ + ) endif() ## diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index e0fe60c..3fd6afc 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -4,11 +4,13 @@ cmake_minimum_required(VERSION 3.1) ## HUNTER ## option(HUNTER_ENABLED "Use hunter to manage dependencies" OFF) -include("../cmake/HunterGate.cmake") -HunterGate( - URL "https://github.com/ruslo/hunter/archive/v0.19.156.tar.gz" - SHA1 "8d5e4635b137365e0d1ade4d60accf4e2bb41f0d" -) +if(HUNTER_ENABLED) + include("../cmake/HunterGate.cmake") + HunterGate( + URL "https://github.com/ruslo/hunter/archive/v0.19.156.tar.gz" + SHA1 "8d5e4635b137365e0d1ade4d60accf4e2bb41f0d" + ) +endif() ## ## PROJECT