Skip to content

Commit

Permalink
[devil] Enable features (microsoft#2825)
Browse files Browse the repository at this point in the history
  • Loading branch information
KindDragon authored and ras0219-msft committed Feb 27, 2018
1 parent 4b26cd2 commit ee3f0af
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 2 deletions.
29 changes: 27 additions & 2 deletions ports/devil/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,29 @@
Source: devil
Version: 1.8.0-1
Build-Depends: zlib, libpng, libjpeg-turbo, tiff, openjpeg, libwebp, libraw, jxrlib, openexr, jasper, liblzma
Version: 1.8.0-2
Build-Depends:
Description: A full featured cross-platform image library
Default-Features: libpng, tiff, libjpeg, openexr, jasper, lcms

Feature: libpng
Build-Depends: libpng
Description: Use Libpng for .png (and some .ico)

Feature: tiff
Build-Depends: tiff
Description: Use Libtiff for .tif support

Feature: libjpeg
Build-Depends: libjpeg-turbo
Description: Use Libjpeg for .jpg (and some .blp) support

Feature: openexr
Build-Depends: openexr
Description: Use openexr

Feature: jasper
Build-Depends: jasper
Description: Use JasPer for .jp2 (and some .icns) support

Feature: lcms
Build-Depends: lcms
Description: Use Little CMS for color profiles
55 changes: 55 additions & 0 deletions ports/devil/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,64 @@ vcpkg_apply_patches(
${CMAKE_CURRENT_LIST_DIR}/enable-static.patch
)

set(IL_NO_PNG 1)
if("libpng" IN_LIST FEATURES)
set(IL_NO_PNG 0)
endif()

set(IL_NO_TIF 1)
if("libtiff" IN_LIST FEATURES)
set(IL_NO_TIF 0)
endif()

set(IL_NO_JPG 1)
if("libjpeg" IN_LIST FEATURES)
set(IL_NO_JPG 0)
endif()

set(IL_NO_EXR 1)
if("openexr" IN_LIST FEATURES)
set(IL_NO_EXR 0)
endif()

set(IL_NO_JP2 1)
if("jasper" IN_LIST FEATURES)
set(IL_NO_JP2 0)
endif()

set(IL_NO_MNG 1)
#if("libmng" IN_LIST FEATURES)
# set(IL_NO_MNG 0)
#endif()

set(IL_NO_LCMS 1)
if("lcms" IN_LIST FEATURES)
set(IL_NO_LCMS 0)
endif()

set(IL_USE_DXTC_NVIDIA 0)
#if("nvtt" IN_LIST FEATURES)
# set(IL_USE_DXTC_NVIDIA 1)
#endif()

set(IL_USE_DXTC_SQUISH 0)
#if("libsquish" IN_LIST FEATURES)
# set(IL_USE_DXTC_SQUISH 1)
#endif()

vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}/DevIL
PREFER_NINJA
OPTIONS
-DIL_NO_PNG=${IL_NO_PNG}
-DIL_NO_TIF=${IL_NO_TIF}
-DIL_NO_JPG=${IL_NO_JPG}
-DIL_NO_EXR=${IL_NO_EXR}
-DIL_NO_JP2=${IL_NO_JP2}
-DIL_NO_MNG=${IL_NO_MNG}
-DIL_NO_LCMS=${IL_NO_LCMS}
-DIL_USE_DXTC_NVIDIA=${IL_USE_DXTC_NVIDIA}
-DIL_USE_DXTC_SQUISH=${IL_USE_DXTC_SQUISH}
)

vcpkg_install_cmake()
Expand Down

0 comments on commit ee3f0af

Please sign in to comment.