Skip to content

Commit

Permalink
Add a Boost-friendly subproject case to CMakeLists (#614)
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimov authored Oct 30, 2021
1 parent c9b339e commit a328bef
Showing 1 changed file with 38 additions and 1 deletion.
39 changes: 38 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,50 @@
#
# Copyright (c) 2017-2019 Mateusz Loskot <mateusz at loskot dot net>
# 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)

#-----------------------------------------------------------------------------
Expand Down Expand Up @@ -250,3 +285,5 @@ endif()
if(BOOST_GIL_BUILD_EXAMPLES AND BOOST_GIL_ENABLE_EXT_IO)
add_subdirectory(example)
endif()

endif()

0 comments on commit a328bef

Please sign in to comment.