diff options
Diffstat (limited to 'vcpkg/ports/qtimageformats')
| -rw-r--r-- | vcpkg/ports/qtimageformats/no_target_promotion_latest.patch | 21 | ||||
| -rw-r--r-- | vcpkg/ports/qtimageformats/portfile.cmake | 41 | ||||
| -rw-r--r-- | vcpkg/ports/qtimageformats/vcpkg.json | 44 |
3 files changed, 106 insertions, 0 deletions
diff --git a/vcpkg/ports/qtimageformats/no_target_promotion_latest.patch b/vcpkg/ports/qtimageformats/no_target_promotion_latest.patch new file mode 100644 index 0000000..244e09f --- /dev/null +++ b/vcpkg/ports/qtimageformats/no_target_promotion_latest.patch @@ -0,0 +1,21 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 7fdd7ddbd..f189c472c 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -9,6 +9,15 @@ project(QtImageFormats # special case + HOMEPAGE_URL "https://qt.io/" + LANGUAGES CXX C + ) +- ++find_package(Threads) ++set_property(TARGET Threads::Threads PROPERTY _qt_no_promote_global TRUE) ++find_package(ZLIB) ++if(TARGET ZLIB::ZLIB) ++ set_property(TARGET ZLIB::ZLIB PROPERTY _qt_no_promote_global TRUE) ++endif() ++find_package(JPEG) ++if(TARGET JPEG::JPEG) ++ set_property(TARGET JPEG::JPEG PROPERTY _qt_no_promote_global TRUE) ++endif() + find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals Core) + find_package(Qt6 ${PROJECT_VERSION} QUIET CONFIG OPTIONAL_COMPONENTS Gui) diff --git a/vcpkg/ports/qtimageformats/portfile.cmake b/vcpkg/ports/qtimageformats/portfile.cmake new file mode 100644 index 0000000..74660c1 --- /dev/null +++ b/vcpkg/ports/qtimageformats/portfile.cmake @@ -0,0 +1,41 @@ +set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled) # Only plugins +set(SCRIPT_PATH "${CURRENT_INSTALLED_DIR}/share/qtbase") +include("${SCRIPT_PATH}/qt_install_submodule.cmake") + +set(${PORT}_PATCHES no_target_promotion_latest.patch) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + #"jasper" CMAKE_REQUIRE_FIND_PACKAGE_WrapJasper + #"webp" CMAKE_REQUIRE_FIND_PACKAGE_WrapWebP + #"tiff" CMAKE_REQUIRE_FIND_PACKAGE_TIFF + INVERTED_FEATURES + "jasper" CMAKE_DISABLE_FIND_PACKAGE_WrapJasper + "webp" CMAKE_DISABLE_FIND_PACKAGE_WrapWebP + "tiff" CMAKE_DISABLE_FIND_PACKAGE_TIFF + ) + +if("jasper" IN_LIST FEATURES) + list(APPEND FEATURE_OPTIONS -DINPUT_jasper=system) +else() + list(APPEND FEATURE_OPTIONS -DINPUT_jasper=no) +endif() +if("webp" IN_LIST FEATURES) + list(APPEND FEATURE_OPTIONS -DINPUT_webp=system) +else() + list(APPEND FEATURE_OPTIONS -DINPUT_webp=no) +endif() +if("tiff" IN_LIST FEATURES) + list(APPEND FEATURE_OPTIONS -DINPUT_tiff=system) +else() + list(APPEND FEATURE_OPTIONS -DINPUT_tiff=no) +endif() +list(APPEND FEATURE_OPTIONS -DINPUT_mng=no) # marked as FIXME + +qt_install_submodule(PATCHES ${${PORT}_PATCHES} + CONFIGURE_OPTIONS + ${FEATURE_OPTIONS} + -DCMAKE_FIND_PACKAGE_TARGETS_GLOBAL=ON # Cf. QTBUG-95052 + CONFIGURE_OPTIONS_RELEASE + CONFIGURE_OPTIONS_DEBUG + ) diff --git a/vcpkg/ports/qtimageformats/vcpkg.json b/vcpkg/ports/qtimageformats/vcpkg.json new file mode 100644 index 0000000..c3b201a --- /dev/null +++ b/vcpkg/ports/qtimageformats/vcpkg.json @@ -0,0 +1,44 @@ +{ + "name": "qtimageformats", + "version": "6.9.1", + "description": "The Qt Image Formats add-on module provides optional support for other image file formats.", + "homepage": "https://www.qt.io/", + "license": null, + "dependencies": [ + { + "name": "qtbase", + "default-features": false, + "features": [ + "gui" + ] + } + ], + "default-features": [ + "jasper", + "tiff", + "webp" + ], + "features": { + "jasper": { + "description": "Use jasper", + "dependencies": [ + "jasper" + ] + }, + "tiff": { + "description": "Use TIFF", + "dependencies": [ + { + "name": "tiff", + "default-features": false + } + ] + }, + "webp": { + "description": "Use WebP", + "dependencies": [ + "libwebp" + ] + } + } +} |