mirror of
https://github.com/boostorg/gil.git
synced 2026-02-02 21:02:13 +00:00
First stab at collection of CMakeLists.txt for Boost.GIL
- Allow building and testing boostorg/gil against Boost from
cloned superproject or installed distribution.
Add CMakeSettings.json config file for VS2017 integration with CMake
- Defines build configurations for VS and Ninja generators.
- Can be used as is or as a template ready to customise.
Add conanfile.txt for Conan package manager (eg. for cmake -DGIL_USE_CONAN=ON).
Add .editignore file to with basic encoding of CMake and CI scripts.
Update .appveyor.yml with two extra CMake-based builds (allowed to fail).
33 lines
1.1 KiB
CMake
33 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)
|
|
#
|
|
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()
|