diff options
Diffstat (limited to '')
| -rw-r--r-- | CMakeLists.txt | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index f5d6b44..131f872 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,15 +1,23 @@ cmake_minimum_required(VERSION 3.21) include(FetchContent) -FetchContent_Declare( - discount - GIT_REPOSITORY "https://github.com/Orc/discount" - GIT_TAG "main" - SOURCE_DIR "discount" -) -FetchContent_MakeAvailable(discount) -add_subdirectory(${discount_SOURCE_DIR}/cmake) +if (DEFINED DISCOUNT_SRC) + FetchContent_Declare( + discount + SOURCE_DIR "${DISCOUNT_SRC}" + ) +else () + FetchContent_Declare( + discount + GIT_REPOSITORY "https://github.com/Orc/discount.git" + GIT_TAG "main" + SOURCE_DIR "discount" + ) +endif() + +FetchContent_MakeAvailable(discount) +add_subdirectory(${discount_SOURCE_DIR}/cmake discount) project(msg C) |
