diff options
Diffstat (limited to 'vcpkg/ports/simage')
| -rw-r--r-- | vcpkg/ports/simage/portfile.cmake | 72 | ||||
| -rw-r--r-- | vcpkg/ports/simage/requies-all-dependencies.patch | 44 | ||||
| -rw-r--r-- | vcpkg/ports/simage/vcpkg.json | 158 |
3 files changed, 274 insertions, 0 deletions
diff --git a/vcpkg/ports/simage/portfile.cmake b/vcpkg/ports/simage/portfile.cmake new file mode 100644 index 0000000..fc7d5c8 --- /dev/null +++ b/vcpkg/ports/simage/portfile.cmake @@ -0,0 +1,72 @@ + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO Coin3D/simage + REF "v${VERSION}" + SHA512 ef8ee5d4952e05861147fa59e7a29ed2020165917f45cc5de6760a52f7cd079135fc921f0e90b9ac9bfff7639204de4d44b0bf6a5f66e6cc35879f62638332b3 + HEAD_REF master + PATCHES requies-all-dependencies.patch +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SIMAGE_BUILD_SHARED_LIBS) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SIMAGE_USE_STATIC_LIBS) +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" SIMAGE_USE_MSVC_STATIC_RUNTIME) + + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + avienc SIMAGE_USE_AVIENC + gdiplus SIMAGE_USE_GDIPLUS + oggvorbis SIMAGE_OGGVORBIS_SUPPORT + sndfile SIMAGE_LIBSNDFILE_SUPPORT + giflib SIMAGE_GIF_SUPPORT + jpeg SIMAGE_JPEG_SUPPORT + png SIMAGE_PNG_SUPPORT + tiff SIMAGE_TIFF_SUPPORT + zlib SIMAGE_ZLIB_SUPPORT +) + +# Depends on the platform +if(VCPKG_TARGET_IS_WINDOWS AND "gdiplus" IN_LIST FEATURES) + message(WARNING "Feature 'gdiplus' will disable feature 'zlib', 'giflib', 'jpeg', 'png' and 'tiff' automaticly.") +endif() + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS ${FEATURE_OPTIONS} + -DSIMAGE_BUILD_SHARED_LIBS:BOOL=${SIMAGE_BUILD_SHARED_LIBS} + -DSIMAGE_USE_STATIC_LIBS:BOOL=${SIMAGE_USE_STATIC_LIBS} + -DSIMAGE_USE_MSVC_STATIC_RUNTIME:BOOL=${SIMAGE_USE_MSVC_STATIC_RUNTIME} + -DSIMAGE_USE_CGIMAGE=OFF + -DSIMAGE_USE_QIMAGE=OFF + -DSIMAGE_USE_QT6=OFF + -DSIMAGE_USE_QT5=OFF + -DSIMAGE_USE_CPACK=OFF + -DSIMAGE_LIBJASPER_SUPPORT=OFF + -DSIMAGE_EPS_SUPPORT=OFF + -DSIMAGE_MPEG2ENC_SUPPORT=OFF + -DSIMAGE_PIC_SUPPORT=OFF + -DSIMAGE_RGB_SUPPORT=OFF + -DSIMAGE_XWD_SUPPORT=OFF + -DSIMAGE_TGA_SUPPORT=OFF + -DSIMAGE_BUILD_MSVC_MP=OFF + -DSIMAGE_BUILD_EXAMPLES=OFF + -DSIMAGE_BUILD_TESTS=OFF + -DSIMAGE_BUILD_DOCUMENTATION=OFF +) + +vcpkg_cmake_install() +vcpkg_copy_pdbs() +vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/simage-${VERSION}) + +if (NOT VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_MINGW) + vcpkg_copy_tools(TOOL_NAMES simage-config AUTO_CLEAN) +endif() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/Coin") + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) + +vcpkg_fixup_pkgconfig() diff --git a/vcpkg/ports/simage/requies-all-dependencies.patch b/vcpkg/ports/simage/requies-all-dependencies.patch new file mode 100644 index 0000000..a0765f8 --- /dev/null +++ b/vcpkg/ports/simage/requies-all-dependencies.patch @@ -0,0 +1,44 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index ef92706..fee22e4 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -129,6 +129,9 @@ if(SIMAGE_USE_GDIPLUS) + } + " GDIPLUS_FOUND) + unset(CMAKE_REQUIRED_LIBRARIES) ++ if(NOT GDIPLUS_FOUND) ++ message(FATAL_ERROR "GDI+ is required on Windows.") ++ endif() + endif() + if(SIMAGE_USE_AVIENC) + set(CMAKE_REQUIRED_LIBRARIES vfw32) +@@ -142,6 +145,9 @@ if(SIMAGE_USE_AVIENC) + } + " VFW_FOUND) + unset(CMAKE_REQUIRED_LIBRARIES) ++ if(NOT VFW_FOUND) ++ message(FATAL_ERROR "Video for Windows is required on Windows.") ++ endif() + endif() + + # On macOS QuickTime supports BMP, GIF, JPEG, JPEG 2000, PNG, TIFF, and TGA. +@@ -286,7 +292,7 @@ if(SIMAGE_OGGVORBIS_SUPPORT) + find_package(Ogg REQUIRED) + find_package(Vorbis REQUIRED) + if(OGG_FOUND) +- find_package(Opus) ++ find_package(Opus REQUIRED) + endif() + endif() + +@@ -306,8 +312,8 @@ if(NOT SIMAGE_QUICKTIME_SUPPORT AND NOT SIMAGE_CGIMAGE_SUPPORT AND NOT SIMAGE_GD + if(SIMAGE_TIFF_SUPPORT) + find_package(TIFF REQUIRED) + if(TIFF_FOUND) +- find_package(LibLZMA) +- find_package(Zstd) ++ find_package(LibLZMA REQUIRED) ++ find_package(Zstd REQUIRED) + endif() + endif() + diff --git a/vcpkg/ports/simage/vcpkg.json b/vcpkg/ports/simage/vcpkg.json new file mode 100644 index 0000000..2f6ec13 --- /dev/null +++ b/vcpkg/ports/simage/vcpkg.json @@ -0,0 +1,158 @@ +{ + "name": "simage", + "version-semver": "1.8.4", + "description": "Image file format library abstraction layer", + "homepage": "https://github.com/coin3d/simage", + "license": "ISC", + "supports": "!uwp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "default-features": [ + "all" + ], + "features": { + "all": { + "description": "Enable all features", + "dependencies": [ + { + "name": "simage", + "default-features": false, + "features": [ + "oggvorbis" + ] + }, + { + "name": "simage", + "default-features": false, + "features": [ + "sndfile" + ] + }, + { + "name": "simage", + "default-features": false, + "features": [ + "avienc" + ], + "platform": "windows" + }, + { + "name": "simage", + "default-features": false, + "features": [ + "gdiplus" + ], + "platform": "windows" + }, + { + "name": "simage", + "default-features": false, + "features": [ + "giflib" + ], + "platform": "!windows" + }, + { + "name": "simage", + "default-features": false, + "features": [ + "jpeg" + ], + "platform": "!windows" + }, + { + "name": "simage", + "default-features": false, + "features": [ + "png" + ], + "platform": "!windows" + }, + { + "name": "simage", + "default-features": false, + "features": [ + "tiff" + ], + "platform": "!windows" + }, + { + "name": "simage", + "default-features": false, + "features": [ + "zlib" + ], + "platform": "!windows" + } + ] + }, + "avienc": { + "description": "Use Video for Windows for AVI encoding", + "supports": "windows" + }, + "gdiplus": { + "description": "Use GDI+ on Windows to load/save images", + "supports": "windows" + }, + "giflib": { + "description": "Enable support for GIF images", + "dependencies": [ + "giflib" + ] + }, + "jpeg": { + "description": "Enable support for JPEG images", + "dependencies": [ + "libjpeg-turbo" + ] + }, + "oggvorbis": { + "description": "Enable support for ogg/vorbis extensions", + "dependencies": [ + "libogg", + "libvorbis", + "opus" + ] + }, + "png": { + "description": "Enable support for PNG images", + "dependencies": [ + "libpng" + ] + }, + "sndfile": { + "description": "Use libsndfile to load/save sampled sound", + "dependencies": [ + { + "name": "libsndfile", + "default-features": false, + "features": [ + "external-libs" + ] + } + ] + }, + "tiff": { + "description": "Enable support for TIFF images", + "dependencies": [ + "liblzma", + "tiff", + "zstd" + ] + }, + "zlib": { + "description": "Enable support for zlib library", + "dependencies": [ + "zlib" + ] + } + } +} |