Use FetchContent

This commit is contained in:
Simon Brand
2019-06-25 09:47:19 +01:00
parent 6ce85550f3
commit d7356bb01c
2 changed files with 11 additions and 3 deletions

View File

@ -1,10 +1,19 @@
cmake_minimum_required(VERSION 3.8)
cmake_minimum_required(VERSION 3.11)
project(tl-optional VERSION 1.0.0 LANGUAGES CXX)
option(OPTIONAL_ENABLE_TESTS "Enable tests." ON)
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/tl-cmake" ${CMAKE_MODULE_PATH})
include(FetchContent)
FetchContent_Declare(
tl_cmake
GIT_REPOSITORY https://github.com/TartanLlama/tl-cmake.git
)
FetchContent_GetProperties(tl_cmake)
if(NOT tl_cmake_POPULATED)
FetchContent_Populate(tl_cmake)
set(CMAKE_MODULE_PATH ${tl_cmake_SOURCE_DIR} ${CMAKE_MODULE_PATH})
endif()
include(add-tl)
tl_add_library(optional SOURCES

Submodule cmake/tl-cmake deleted from 576e25feab