aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/qt5-imageformats
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/qt5-imageformats
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/qt5-imageformats')
-rw-r--r--vcpkg/ports/qt5-imageformats/portfile.cmake49
-rw-r--r--vcpkg/ports/qt5-imageformats/vcpkg.json54
2 files changed, 103 insertions, 0 deletions
diff --git a/vcpkg/ports/qt5-imageformats/portfile.cmake b/vcpkg/ports/qt5-imageformats/portfile.cmake
new file mode 100644
index 0000000..fd97931
--- /dev/null
+++ b/vcpkg/ports/qt5-imageformats/portfile.cmake
@@ -0,0 +1,49 @@
+set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
+
+include("${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake")
+
+list(APPEND CORE_OPTIONS
+ -no-mng # must be explicitly disabled to not automatically pick up mng
+ -verbose
+)
+
+if("jasper" IN_LIST FEATURES)
+ list(APPEND CORE_OPTIONS -jasper)
+
+ x_vcpkg_pkgconfig_get_modules(PREFIX jasper MODULES jasper LIBS)
+
+ file(READ "${CURRENT_INSTALLED_DIR}/share/jasper/vcpkg_abi_info.txt" jasper_abi_info)
+ if(jasper_abi_info MATCHES "(^|;)opengl(;|$)")
+ find_library(FREEGLUT_RELEASE NAMES freeglut glut PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH)
+ find_library(FREEGLUT_DEBUG NAMES freeglutd freeglut glutd glut PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH)
+ endif()
+
+ list(APPEND OPT_REL "JASPER_LIBS=${jasper_LIBS_RELEASE} ${FREEGLUT_RELEASE}")
+ list(APPEND OPT_DBG "JASPER_LIBS=${jasper_LIBS_DEBUG} ${FREEGLUT_DEBUG}")
+else()
+ list(APPEND CORE_OPTIONS -no-jasper)
+endif()
+
+if("tiff" IN_LIST FEATURES)
+ list(APPEND CORE_OPTIONS -system-tiff)
+
+ x_vcpkg_pkgconfig_get_modules(PREFIX tiff MODULES libtiff-4 LIBS)
+ list(APPEND OPT_REL "TIFF_LIBS=${tiff_LIBS_RELEASE}")
+ list(APPEND OPT_DBG "TIFF_LIBS=${tiff_LIBS_DEBUG}")
+else()
+ list(APPEND CORE_OPTIONS -no-tiff)
+endif()
+
+if("webp" IN_LIST FEATURES)
+ list(APPEND CORE_OPTIONS -system-webp)
+
+ x_vcpkg_pkgconfig_get_modules(PREFIX webp MODULES libwebp libwebpdemux libwebpmux libwebpdecoder LIBS)
+ list(APPEND CORE_OPTIONS "WEBP_INCDIR=${CURRENT_INSTALLED_DIR}/include") # Requires libwebp[all]
+ # This will still fail if LIBWEBP is installed with all available features due to the missing additional dependencies
+ list(APPEND OPT_REL "WEBP_LIBS=${webp_LIBS_RELEASE}")
+ list(APPEND OPT_DBG "WEBP_LIBS=${webp_LIBS_DEBUG}")
+else()
+ list(APPEND CORE_OPTIONS -no-webp)
+endif()
+
+qt_submodule_installation(BUILD_OPTIONS ${CORE_OPTIONS} BUILD_OPTIONS_RELEASE ${OPT_REL} BUILD_OPTIONS_DEBUG ${OPT_DBG})
diff --git a/vcpkg/ports/qt5-imageformats/vcpkg.json b/vcpkg/ports/qt5-imageformats/vcpkg.json
new file mode 100644
index 0000000..8c9c5f1
--- /dev/null
+++ b/vcpkg/ports/qt5-imageformats/vcpkg.json
@@ -0,0 +1,54 @@
+{
+ "name": "qt5-imageformats",
+ "version": "5.15.18",
+ "description": "The Qt Image Formats add-on module provides optional support for other image file formats.",
+ "license": null,
+ "dependencies": [
+ {
+ "name": "qt5-base",
+ "default-features": false
+ }
+ ],
+ "default-features": [
+ "tiff",
+ "webp"
+ ],
+ "features": {
+ "jasper": {
+ "description": "Enable JPEG-2000 support using the JasPer library",
+ "dependencies": [
+ {
+ "name": "jasper",
+ "default-features": false
+ },
+ {
+ "name": "vcpkg-pkgconfig-get-modules",
+ "host": true
+ }
+ ]
+ },
+ "tiff": {
+ "description": "Enable TIFF support",
+ "dependencies": [
+ {
+ "name": "tiff",
+ "default-features": false
+ },
+ {
+ "name": "vcpkg-pkgconfig-get-modules",
+ "host": true
+ }
+ ]
+ },
+ "webp": {
+ "description": "Enable WEBP support",
+ "dependencies": [
+ "libwebp",
+ {
+ "name": "vcpkg-pkgconfig-get-modules",
+ "host": true
+ }
+ ]
+ }
+ }
+}