diff options
| author | Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> | 2021-10-12 01:22:36 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-10-11 10:22:36 -0700 |
| commit | a6768f64260f0380e7daca3d2a5519bbd496e13b (patch) | |
| tree | 18f71a38557412b5ff5f4d1725cd048c508e93df | |
| parent | 822eb4b4ce82d76fa5bcfa8f5774f47db4e01e8b (diff) | |
| download | vcpkg-a6768f64260f0380e7daca3d2a5519bbd496e13b.tar.gz vcpkg-a6768f64260f0380e7daca3d2a5519bbd496e13b.zip | |
[openimageio/libsquish] Export libsquish cmake target and fix find dependency libsquish (#20240)
* [libsquish] Export cmake target
* [openimageio] Fix find dependency libsquish
* version
* Rename the target
* Re-fix dependency libsquish, apply official changes
* version stuff
* more version
* Change namespace
* Update patch
* version
* Remove unused patch
* version
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
| -rw-r--r-- | ports/libsquish/export-target.patch | 19 | ||||
| -rw-r--r-- | ports/libsquish/portfile.cmake | 15 | ||||
| -rw-r--r-- | ports/libsquish/vcpkg.json | 14 | ||||
| -rw-r--r-- | ports/openimageio/fix-dependencies.patch | 95 | ||||
| -rw-r--r-- | ports/openimageio/portfile.cmake | 1 | ||||
| -rw-r--r-- | ports/openimageio/vcpkg.json | 2 | ||||
| -rw-r--r-- | versions/baseline.json | 4 | ||||
| -rw-r--r-- | versions/l-/libsquish.json | 5 | ||||
| -rw-r--r-- | versions/o-/openimageio.json | 5 |
9 files changed, 141 insertions, 19 deletions
diff --git a/ports/libsquish/export-target.patch b/ports/libsquish/export-target.patch new file mode 100644 index 000000000..78f5f30f5 --- /dev/null +++ b/ports/libsquish/export-target.patch @@ -0,0 +1,19 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a3ecdde..94c7b3d 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -120,8 +120,14 @@ INCLUDE(GNUInstallDirs) + + INSTALL( + TARGETS squish ++ EXPORT unofficial-libsquishConfig + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR} + ) ++ ++INSTALL(EXPORT unofficial-libsquishConfig ++ NAMESPACE unofficial::libsquish:: ++ DESTINATION share/unofficial-libsquish ++) diff --git a/ports/libsquish/portfile.cmake b/ports/libsquish/portfile.cmake index a7ff15594..80c4ef54b 100644 --- a/ports/libsquish/portfile.cmake +++ b/ports/libsquish/portfile.cmake @@ -4,17 +4,20 @@ vcpkg_from_sourceforge( FILENAME "libsquish-1.15.tgz"
NO_REMOVE_ONE_LEVEL
SHA512 5b569b7023874c7a43063107e2e428ea19e6eb00de045a4a13fafe852ed5402093db4b65d540b5971ec2be0d21cb97dfad9161ebfe6cf6e5376174ff6c6c3e7a
- PATCHES fix-export-symbols.patch
+ PATCHES
+ fix-export-symbols.patch
+ export-target.patch
)
-vcpkg_configure_cmake(
+vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
- PREFER_NINJA
DISABLE_PARALLEL_CONFIGURE
)
-vcpkg_install_cmake()
+vcpkg_cmake_install()
-file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-libsquish CONFIG_PATH share/unofficial-libsquish)
-file(INSTALL ${SOURCE_PATH}/LICENSE.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
+
+file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
diff --git a/ports/libsquish/vcpkg.json b/ports/libsquish/vcpkg.json index 9cb40167a..3d247cb93 100644 --- a/ports/libsquish/vcpkg.json +++ b/ports/libsquish/vcpkg.json @@ -1,7 +1,17 @@ { "name": "libsquish", "version-string": "1.15", - "port-version": 8, + "port-version": 9, "description": "Open source DXT compression library.", - "homepage": "https://sourceforge.net/projects/libsquish" + "homepage": "https://sourceforge.net/projects/libsquish", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] } diff --git a/ports/openimageio/fix-dependencies.patch b/ports/openimageio/fix-dependencies.patch index 81b95ff9c..433d960e3 100644 --- a/ports/openimageio/fix-dependencies.patch +++ b/ports/openimageio/fix-dependencies.patch @@ -1,22 +1,22 @@ diff --git a/src/cmake/Config.cmake.in b/src/cmake/Config.cmake.in -index 740da06..1a326f7 100644 +index 740da06..a34d4c9 100644 --- a/src/cmake/Config.cmake.in +++ b/src/cmake/Config.cmake.in @@ -11,6 +11,9 @@ elseif (@OpenEXR_VERSION@ VERSION_GREATER_EQUAL 2.4 AND @FOUND_OPENEXR_WITH_CONF HINTS @IlmBase_DIR@ @OpenEXR_DIR@) find_dependency(OpenEXR @OpenEXR_VERSION@ HINTS @OpenEXR_DIR@) -+ find_dependency(libpng CONFIG) -+ find_dependency(libheif CONFIG) -+ find_dependency(Libsquish) ++ find_dependency(libpng CONFIG REQUIRED) ++ find_dependency(libheif CONFIG REQUIRED) ++ find_dependency(unofficial-libsquish CONFIG REQUIRED) find_dependency(ZLIB @ZLIB_VERSION@) # Because OpenEXR doesn't do it find_dependency(Threads) # Because OpenEXR doesn't do it endif () diff --git a/src/cmake/externalpackages.cmake b/src/cmake/externalpackages.cmake -index 21e18b5..badee4b 100644 +index 957abe3..2c093dd 100644 --- a/src/cmake/externalpackages.cmake +++ b/src/cmake/externalpackages.cmake -@@ -151,7 +151,7 @@ find_python() +@@ -148,7 +148,7 @@ find_python() # Dependencies for optional formats and features. If these are not found, # we will continue building, but the related functionality will be disabled. @@ -25,7 +25,25 @@ index 21e18b5..badee4b 100644 checked_find_package (BZip2) # Used by ffmpeg and freetype if (NOT BZIP2_FOUND) -@@ -185,7 +185,8 @@ checked_find_package (GIF +@@ -158,8 +158,6 @@ endif () + checked_find_package (Freetype + DEFINITIONS -DUSE_FREETYPE=1 ) + +-checked_find_package (HDF5 +- ISDEPOF Field3D) + checked_find_package (OpenColorIO + DEFINITIONS -DUSE_OCIO=1 -DUSE_OPENCOLORIO=1 + # PREFER_CONFIG +@@ -176,15 +174,15 @@ checked_find_package (TBB 2017 + checked_find_package (DCMTK VERSION_MIN 3.6.1) # For DICOM images + checked_find_package (FFmpeg VERSION_MIN 3.0) + checked_find_package (Field3D +- DEPS HDF5 +- DEFINITIONS -DUSE_FIELD3D=1) ++ DEFINITIONS -DUSE_FIELD3D=1) + checked_find_package (GIF + VERSION_MIN 4 + RECOMMEND_MIN 5.0 RECOMMEND_MIN_REASON "for stability and thread safety") # For HEIF/HEIC/AVIF formats @@ -35,6 +53,42 @@ index 21e18b5..badee4b 100644 RECOMMEND_MIN 1.7 RECOMMEND_MIN_REASON "for AVIF support") if (APPLE AND LIBHEIF_VERSION VERSION_GREATER_EQUAL 1.10 AND LIBHEIF_VERSION VERSION_LESS 1.11) +@@ -291,7 +289,8 @@ endmacro() + option (USE_EMBEDDED_LIBSQUISH + "Force use of embedded Libsquish, even if external is found" OFF) + if (NOT USE_EMBEDDED_LIBSQUISH) +- checked_find_package (Libsquish) ++ checked_find_package (unofficial-libsquish PREFER_CONFIG) ++ set(Libsquish_FOUND 1) + endif () + + +diff --git a/src/dds.imageio/CMakeLists.txt b/src/dds.imageio/CMakeLists.txt +index d693453..9bef055 100644 +--- a/src/dds.imageio/CMakeLists.txt ++++ b/src/dds.imageio/CMakeLists.txt +@@ -5,7 +5,7 @@ + if (Libsquish_FOUND) + # External libsquish was found -- use it + add_oiio_plugin (ddsinput.cpp +- LINK_LIBRARIES Libsquish::Libsquish ++ LINK_LIBRARIES unofficial::libsquish::squish + ) + else () + # No external libsquish was found -- use the embedded version. +diff --git a/src/field3d.imageio/CMakeLists.txt b/src/field3d.imageio/CMakeLists.txt +index a9e54e3..cc73ac4 100644 +--- a/src/field3d.imageio/CMakeLists.txt ++++ b/src/field3d.imageio/CMakeLists.txt +@@ -9,7 +9,7 @@ if (Field3D_FOUND) + endif () + add_oiio_plugin (field3dinput.cpp field3doutput.cpp + INCLUDE_DIRS ${FIELD3D_INCLUDES} +- LINK_LIBRARIES Field3D::Field3D ++ LINK_LIBRARIES ${FIELD3D_LIBRARIES} + # ${HDF5_LIBRARIES} + ${SZIP_LIBRARY}) + endif() diff --git a/src/heif.imageio/CMakeLists.txt b/src/heif.imageio/CMakeLists.txt index fed8001..15e87ae 100644 --- a/src/heif.imageio/CMakeLists.txt @@ -73,3 +127,30 @@ index 9ba76ac..13db4ac 100644 else () message (WARNING "libpng not found, so ICO support will not work") set (format_plugin_definitions ${format_plugin_definitions} DISABLE_ICO=1 PARENT_SCOPE) +diff --git a/src/openvdb.imageio/CMakeLists.txt b/src/openvdb.imageio/CMakeLists.txt +index 57a0f62..3a07c31 100644 +--- a/src/openvdb.imageio/CMakeLists.txt ++++ b/src/openvdb.imageio/CMakeLists.txt +@@ -4,6 +4,6 @@ + + if (OpenVDB_FOUND) + add_oiio_plugin (openvdbinput.cpp +- INCLUDE_DIRS ${TBB_INCLUDE_DIRS} +- LINK_LIBRARIES OpenVDB::OpenVDB ${TBB_tbb_LIBRARY} ${BOOST_LIBRARIES}) ++ INCLUDE_DIRS ${OPENVDB_INCLUDES} ${TBB_INCLUDE_DIRS} ++ LINK_LIBRARIES ${OPENVDB_LIBRARIES} ${TBB_tbb_LIBRARY} ${BOOST_LIBRARIES}) + endif() +diff --git a/src/webp.imageio/CMakeLists.txt b/src/webp.imageio/CMakeLists.txt +index 44462c4..e1cb068 100644 +--- a/src/webp.imageio/CMakeLists.txt ++++ b/src/webp.imageio/CMakeLists.txt +@@ -4,7 +4,8 @@ + + if (WebP_FOUND) + add_oiio_plugin (webpinput.cpp webpoutput.cpp +- LINK_LIBRARIES WebP::WebP WebP::WebPDemux ++ INCLUDE_DIRS ${WEBP_INCLUDES} ++ LINK_LIBRARIES ${WEBP_LIBRARIES} + DEFINITIONS "-DUSE_WEBP=1") + else () + message (STATUS "WebP plugin will not be built") diff --git a/ports/openimageio/portfile.cmake b/ports/openimageio/portfile.cmake index 124c7183b..55a1535b0 100644 --- a/ports/openimageio/portfile.cmake +++ b/ports/openimageio/portfile.cmake @@ -84,7 +84,6 @@ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/doc" "${CURRENT_PACKAGES_DIR}/debug/share") file(COPY "${SOURCE_PATH}/src/cmake/modules/FindOpenImageIO.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/OpenImageIO") -file(COPY "${SOURCE_PATH}/src/cmake/modules/FindLibsquish.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/OpenImageIO") file(COPY "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") # Handle copyright diff --git a/ports/openimageio/vcpkg.json b/ports/openimageio/vcpkg.json index 35ac61011..0dc7c2edd 100644 --- a/ports/openimageio/vcpkg.json +++ b/ports/openimageio/vcpkg.json @@ -1,7 +1,7 @@ { "name": "openimageio", "version": "2.3.7.2", - "port-version": 2, + "port-version": 3, "description": "A library for reading and writing images, and a bunch of related classes, utilities, and application.", "homepage": "https://github.com/OpenImageIO/oiio", "dependencies": [ diff --git a/versions/baseline.json b/versions/baseline.json index 9c9abee63..156461138 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3810,7 +3810,7 @@ }, "libsquish": { "baseline": "1.15", - "port-version": 8 + "port-version": 9 }, "libsrt": { "baseline": "1.3.4", @@ -4854,7 +4854,7 @@ }, "openimageio": { "baseline": "2.3.7.2", - "port-version": 2 + "port-version": 3 }, "openjpeg": { "baseline": "2.4.0", diff --git a/versions/l-/libsquish.json b/versions/l-/libsquish.json index d1b638460..4c70c7dec 100644 --- a/versions/l-/libsquish.json +++ b/versions/l-/libsquish.json @@ -1,6 +1,11 @@ { "versions": [ { + "git-tree": "97da7fd0b127d2b07821950e5aee7acadbcd9d17", + "version-string": "1.15", + "port-version": 9 + }, + { "git-tree": "9e7c8060fb2b0499a31df98ef1e8652081e18944", "version-string": "1.15", "port-version": 8 diff --git a/versions/o-/openimageio.json b/versions/o-/openimageio.json index 827012dfd..1b67c28e9 100644 --- a/versions/o-/openimageio.json +++ b/versions/o-/openimageio.json @@ -1,6 +1,11 @@ { "versions": [ { + "git-tree": "a7643bd1ea5b962a2b98a9c6c991a15021fab17d", + "version": "2.3.7.2", + "port-version": 3 + }, + { "git-tree": "6084a6398514fc24fd450a7b9290937b1274d7b6", "version": "2.3.7.2", "port-version": 2 |
