2
0
mirror of https://github.com/boostorg/gil.git synced 2026-01-19 04:12:11 +00:00

Use b2 modules to detect IO libs. (#28)

Use b2 modules to detect IO libs.
This commit is contained in:
Stefan Seefeld
2017-12-06 22:23:51 -05:00
parent 6f355a7d96
commit 780d0ea95e
2 changed files with 49 additions and 25 deletions

View File

@@ -52,8 +52,17 @@ environment:
TOOLSET: msvc-14.1
install:
- cd ..
- git clone -b %APPVEYOR_REPO_BRANCH% --depth 1 https://github.com/boostorg/boost.git boost-root
- if %ARCH% == x86 ( set "TRIPLET=x86-windows" ) else ( set "TRIPLET=x64-windows" )
- if %ARCH% == x86 ( set AM=32 ) else ( set AM=64 )
- |
cd ..
set PATH=C:\Program Files (x86)\MSBuild\14.0\Bin;%PATH%
git clone https://github.com/Microsoft/vcpkg
cd vcpkg
powershell -exec bypass scripts\bootstrap.ps1
vcpkg --triplet %TRIPLET% install libjpeg-turbo libpng tiff
cd ..
- git clone -b develop --depth 1 https://github.com/boostorg/boost.git boost-root
- cd boost-root
- git submodule update --init tools/build
- git submodule update --init libs/config
@@ -66,7 +75,11 @@ install:
build: off
test_script:
- PATH=%ADDPATH%%PATH%
- set PATH=%ADDPATH%%PATH%
- set "VCPKG=%APPVEYOR_BUILD_FOLDER%\..\vcpkg\installed\%TRIPLET%"
- set I=%VCPKG%\include
- set L=%VCPKG%\lib
- set LIBPNG_NAME=libpng16
- b2 address-model=%AM% libs/gil/test toolset=%TOOLSET% %CXXFLAGS%
- b2 address-model=%AM% libs/gil/io/test//simple -spng-prefix=%APPVEYOR_BUILD_FOLDER%/../vcpkg/installed/%TRIPLET% -stiff-prefix=%APPVEYOR_BUILD_FOLDER%/../vcpkg/installed/%TRIPLET% -sjpeg-prefix=%APPVEYOR_BUILD_FOLDER%/../vcpkg/installed/%TRIPLET% -slibpng=libpng16 -szlib=zlib toolset=%TOOLSET% %CXXFLAGS%
- b2 address-model=%AM% libs/gil/io/test//simple toolset=%TOOLSET% %CXXFLAGS% include=%I% library-path=%L%
- b2 address-model=%AM% libs/gil/toolbox/test toolset=%TOOLSET% %CXXFLAGS%

View File

@@ -9,22 +9,12 @@
# bring in rules for testing
import testing ;
import ac ;
jpeg-prefix = [ modules.peek : jpeg-prefix ] ;
png-prefix = [ modules.peek : png-prefix ] ;
tiff-prefix = [ modules.peek : tiff-prefix ] ;
zlib-prefix = [ modules.peek : zlib-prefix ] ;
# libpng uses different names on different platforms, so we need to parametrize it.
libpng = [ modules.peek : libpng ] ;
libpng ?= png ;
# zlib uses different names, too...
zlib = [ modules.peek : zlib ] ;
zlib ?= z ;
lib jpeg : : <search>$(jpeg-prefix)/lib : : <include>$(jpeg-prefix)/include ;
lib png : : <name>$(libpng) <search>$(png-prefix)/lib : : <include>$(png-prefix)/include ;
lib tiff : : <search>$(tiff-prefix)/lib : : <include>$(tiff-prefix)/include ;
lib zlib : : <name>$(zlib) <search>$(zlib-prefix)/lib : : <include>$(zlib-prefix)/include ;
using libjpeg : : : : true ; # work around bug on master
using zlib ;
using libpng : : : : true ;
using libtiff : : : : true ;
project
: requirements
@@ -35,20 +25,39 @@ project
<toolset>msvc-10.0:<define>_SCL_SECURE_NO_DEPRECATE <define>_CRT_SECURE_NO_WARNINGS <define>_CRT_NONSTDC_NO_DEPRECATE
<toolset>msvc-14.0:<define>_SCL_SECURE_NO_DEPRECATE <define>_CRT_SECURE_NO_WARNINGS <define>_CRT_NONSTDC_NO_DEPRECATE
<define>BOOST_TEST_DYN_LINK
<define>BOOST_GIL_IO_TEST_ALLOW_READING_IMAGES
<define>BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
<library>/boost/test//boost_unit_test_framework
<library>/boost/system//boost_system
<library>/boost/filesystem//boost_filesystem
;
test-suite simple : [ run all_formats_test.cpp png zlib jpeg tiff ] ;
test-suite simple
: [ run all_formats_test.cpp
: # args
: # input files
: # requirements
<define>BOOST_GIL_IO_TEST_ALLOW_READING_IMAGES
<define>BOOST_GIL_IO_TEST_ALLOW_WRITING_IMAGES
[ ac.check-library /libjpeg//libjpeg : <library>/libjpeg//libjpeg : <build>no ]
[ ac.check-library /zlib//zlib : <library>/zlib//zlib : <build>no ]
[ ac.check-library /libpng//libpng : <library>/libpng//libpng : <build>no ]
[ ac.check-library /libtiff//libtiff : <library>/libtiff//libtiff : <build>no ]
]
;
test-suite full :
[ run bmp_test.cpp bmp_old_test.cpp bmp_read_test.cpp bmp_write_test.cpp ]
[ run jpeg_test.cpp jpeg_old_test.cpp jpeg_read_test.cpp jpeg_write_test.cpp jpeg ]
[ run jpeg_test.cpp jpeg_old_test.cpp jpeg_read_test.cpp jpeg_write_test.cpp
:
:
: [ ac.check-library /libjpeg//libjpeg : <library>/libjpeg//libjpeg : <build>no ] ]
#make.cpp
[ run png_test.cpp png_old_test.cpp png_file_format_test.cpp png_read_test.cpp png zlib ]
[ run png_test.cpp png_old_test.cpp png_file_format_test.cpp png_read_test.cpp
:
:
:
[ ac.check-library /zlib//zlib : <library>/zlib//zlib : <build>no ]
[ ac.check-library /libpng//libpng : <library>/libpng//libpng : <build>no ]
]
[ run pnm_test.cpp pnm_old_test.cpp pnm_read_test.cpp pnm_write_test.cpp ]
#raw_test.cpp
[ run targa_test.cpp targa_old_test.cpp targa_read_test.cpp targa_write_test.cpp ]
@@ -79,6 +88,8 @@ test-suite full :
tiff_tiled_rgb_planar_test_21-31_32_64.cpp
tiff_tiled_test.cpp
tiff_write_test.cpp
tiff
:
:
: [ ac.check-library /libtiff//libtiff : <library>/libtiff//libtiff : <build>no ]
]
;