2 # Copyright (c) 2017 Mateusz Loskot <mateusz at loskot dot net>
5 # Distributed under the Boost Software License, Version 1.0.
6 # (See accompanying file LICENSE_1_0.txt or copy at
7 # http://www.boost.org/LICENSE_1_0.txt)
9 message(STATUS "Boost.GIL: Configuring examples")
11 if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.12.0)
12 file(GLOB_RECURSE _examples ${CMAKE_CURRENT_LIST_DIR}/*.cpp CONFIGURE_DEPEND)
14 file(GLOB_RECURSE _examples ${CMAKE_CURRENT_LIST_DIR}/*.cpp)
17 foreach(_example ${_examples})
18 get_filename_component(_name ${_example} NAME_WE)
19 add_executable(example_${_name} ${_name}.cpp)
20 target_compile_definitions(example_${_name} PRIVATE BOOST_GIL_USE_CONCEPT_CHECK=1)
21 # Unfortunately, ALIAS of imported target is not supported
22 # see https://github.com/conan-io/conan/issues/2125
24 target_link_libraries(example_${_name}
27 gil_include_directories
28 Boost::disable_autolinking
34 target_link_libraries(example_${_name}
37 gil_include_directories