2
0
mirror of https://github.com/boostorg/gil.git synced 2026-02-19 02:22:09 +00:00
Files
gil/example/CMakeLists.txt
Mateusz Loskot b231bd5904 Add CMake option GIL_ENABLE_IO (default=ON)
Allow to enable/disable building of IO tests and examples
which depend on thirdparty libraries (libjpeg,libpng,libtiff).
2018-06-27 00:02:27 -04:00

35 lines
1.1 KiB
CMake

#
# Copyright (c) 2017 Mateusz Loskot <mateusz at loskot dot net>
# All rights reserved.
#
# 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)
#
message(STATUS "Configuring Boost.GIL examples tests")
foreach(name affine convolution dynamic_image histogram interleaved_ptr mandelbrot packed_pixel resize x_gradient)
add_executable(gil_example_${name} ${name}.cpp)
target_compile_definitions(gil_example_${name} PRIVATE BOOST_GIL_USE_CONCEPT_CHECK=1)
# Unfortunately, ALIAS of imported target is not supported
# see https://github.com/conan-io/conan/issues/2125
if (GIL_USE_CONAN)
target_link_libraries(gil_example_${name}
PRIVATE
Boost::disable_autolinking
Boost::filesystem
CONAN_PKG::libjpeg
CONAN_PKG::libpng
CONAN_PKG::libtiff)
else()
target_link_libraries(gil_example_${name}
PRIVATE
Boost::disable_autolinking
Boost::filesystem
PNG::PNG
TIFF::TIFF
${JPEG_LIBRARIES})
target_include_directories(gil_example_${name} ${JPEG_INCLUDE_DIR})
endif()
endforeach()