Skip to content

Commit d7356bb

Browse files
committed
Use FetchContent
1 parent 6ce8555 commit d7356bb

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

CMakeLists.txt

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,19 @@
1-
cmake_minimum_required(VERSION 3.8)
1+
cmake_minimum_required(VERSION 3.11)
22

33
project(tl-optional VERSION 1.0.0 LANGUAGES CXX)
44

55
option(OPTIONAL_ENABLE_TESTS "Enable tests." ON)
66

7-
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/tl-cmake" ${CMAKE_MODULE_PATH})
7+
include(FetchContent)
8+
FetchContent_Declare(
9+
tl_cmake
10+
GIT_REPOSITORY https://github.com/TartanLlama/tl-cmake.git
11+
)
12+
FetchContent_GetProperties(tl_cmake)
13+
if(NOT tl_cmake_POPULATED)
14+
FetchContent_Populate(tl_cmake)
15+
set(CMAKE_MODULE_PATH ${tl_cmake_SOURCE_DIR} ${CMAKE_MODULE_PATH})
16+
endif()
817
include(add-tl)
918

1019
tl_add_library(optional SOURCES

cmake/tl-cmake

Submodule tl-cmake deleted from 576e25f

0 commit comments

Comments
 (0)