mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-27 19:09:00 +08:00
[libspng]: New port (#35412)
* [libspng]: New port * fix usage * update version
This commit is contained in:
parent
af6b93abd4
commit
7bb78b3f15
11
ports/libspng/fix-spngconfig-cmake.patch
Normal file
11
ports/libspng/fix-spngconfig-cmake.patch
Normal file
@ -0,0 +1,11 @@
|
||||
diff --git a/cmake/Config.cmake.in b/cmake/Config.cmake.in
|
||||
index d0123db..5756179 100644
|
||||
--- a/cmake/Config.cmake.in
|
||||
+++ b/cmake/Config.cmake.in
|
||||
@@ -1,5 +1,6 @@
|
||||
@PACKAGE_INIT@
|
||||
|
||||
+include(CMakeFindDependencyMacro)
|
||||
find_dependency(ZLIB REQUIRED)
|
||||
|
||||
include("${CMAKE_CURRENT_LIST_DIR}/@targets_export_name@.cmake")
|
33
ports/libspng/portfile.cmake
Normal file
33
ports/libspng/portfile.cmake
Normal file
@ -0,0 +1,33 @@
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO randy408/libspng
|
||||
REF "v${VERSION}"
|
||||
SHA512 cd729653599ed97f80d19f3048c1b3bc2ac16f922b3465804b1913bc45d9fc8b28b56bc2121fda36e9d3dcdd12612cced5383313b722a5342b613f8781879f1a
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
fix-spngconfig-cmake.patch
|
||||
)
|
||||
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" SPNG_BUILD_STATIC)
|
||||
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" SPNG_BUILD_SHARED)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DSPNG_STATIC=${SPNG_BUILD_STATIC}
|
||||
-DSPNG_SHARED=${SPNG_BUILD_SHARED}
|
||||
-DBUILD_EXAMPLES=OFF
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/spng PACKAGE_NAME spng)
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
|
||||
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|
4
ports/libspng/usage
Normal file
4
ports/libspng/usage
Normal file
@ -0,0 +1,4 @@
|
||||
libspng provides CMake targets:
|
||||
|
||||
find_package(SPNG CONFIG REQUIRED)
|
||||
target_link_libraries(main PRIVATE $<IF:$<TARGET_EXISTS:spng::spng>,spng::spng,spng::spng_static>)
|
18
ports/libspng/vcpkg.json
Normal file
18
ports/libspng/vcpkg.json
Normal file
@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "libspng",
|
||||
"version": "0.7.4",
|
||||
"description": "Simple, modern libpng alternative",
|
||||
"homepage": "https://github.com/randy408/libspng",
|
||||
"license": "BSD-2-Clause",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
},
|
||||
"zlib"
|
||||
]
|
||||
}
|
@ -4836,6 +4836,10 @@
|
||||
"baseline": "0.2.3",
|
||||
"port-version": 2
|
||||
},
|
||||
"libspng": {
|
||||
"baseline": "0.7.4",
|
||||
"port-version": 0
|
||||
},
|
||||
"libsquish": {
|
||||
"baseline": "1.15",
|
||||
"port-version": 13
|
||||
|
9
versions/l-/libspng.json
Normal file
9
versions/l-/libspng.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "ed674df56d8b39d76443c7db3ae893c08394bf9c",
|
||||
"version": "0.7.4",
|
||||
"port-version": 0
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Reference in New Issue
Block a user