mirror of
https://github.com/TartanLlama/optional.git
synced 2025-07-29 17:37:13 +02:00
Use FetchContent
This commit is contained in:
@ -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)
|
project(tl-optional VERSION 1.0.0 LANGUAGES CXX)
|
||||||
|
|
||||||
option(OPTIONAL_ENABLE_TESTS "Enable tests." ON)
|
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)
|
include(add-tl)
|
||||||
|
|
||||||
tl_add_library(optional SOURCES
|
tl_add_library(optional SOURCES
|
||||||
|
Submodule cmake/tl-cmake deleted from 576e25feab
Reference in New Issue
Block a user