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 /ports/libsquish | |
| 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>
Diffstat (limited to 'ports/libsquish')
| -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 |
3 files changed, 40 insertions, 8 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 + } + ] } |
