From 85838cdc4e46e861e15eb9e608a6ca3f7f0147e3 Mon Sep 17 00:00:00 2001 From: Peter Dimov Date: Fri, 4 Jun 2021 20:53:02 +0300 Subject: [PATCH] Add a Boost-friendly subproject case to CMakeLists --- CMakeLists.txt | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fc5e60123b..f0f777bd5b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,15 +1,50 @@ # # Copyright (c) 2017-2019 Mateusz Loskot +# Copyright (c) 2020-2021 Peter Dimov # # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) # + +if(NOT CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR) + +# Generated by `boostdep --cmake gil` + +cmake_minimum_required(VERSION 3.8...3.20) + +project(boost_gil VERSION "${BOOST_SUPERPROJECT_VERSION}" LANGUAGES CXX) + +add_library(boost_gil INTERFACE) +add_library(Boost::gil ALIAS boost_gil) + +target_include_directories(boost_gil INTERFACE include) + +target_link_libraries(boost_gil + INTERFACE + Boost::assert + Boost::concept_check + Boost::config + Boost::container_hash + Boost::core + Boost::filesystem + Boost::integer + Boost::iterator + Boost::mp11 + Boost::preprocessor + Boost::type_traits + Boost::variant2 +) + +target_compile_features(boost_gil INTERFACE cxx_std_11) + +else() + # **WARNING:** # The CMake configuration is only provided for convenience # of contributors. It does not export or install any targets, # deploy config files or support subproject workflow. -# + cmake_minimum_required(VERSION 3.10) #----------------------------------------------------------------------------- @@ -250,3 +285,5 @@ endif() if(BOOST_GIL_BUILD_EXAMPLES AND BOOST_GIL_ENABLE_EXT_IO) add_subdirectory(example) endif() + +endif()