mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
[libyaml] Export the pkgconfig files (#21829)
* [libyaml] Export the pkgconfig files * version * Fix cmake config file path * version
This commit is contained in:
parent
2d922f46cc
commit
738720268b
15
ports/libyaml/export-pkgconfig.patch
Normal file
15
ports/libyaml/export-pkgconfig.patch
Normal file
@ -0,0 +1,15 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 4f81148..8006536 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -158,3 +158,10 @@ install(
|
||||
FILES ${config_version_file}
|
||||
DESTINATION ${INSTALL_CMAKE_DIR} COMPONENT Development
|
||||
)
|
||||
+
|
||||
+set(prefix ${CMAKE_INSTALL_PREFIX})
|
||||
+set(exec_prefix ${CMAKE_INSTALL_PREFIX})
|
||||
+set(includedir ${CMAKE_INSTALL_PREFIX}/include)
|
||||
+set(libdir ${CMAKE_INSTALL_PREFIX}/lib)
|
||||
+configure_file(yaml-0.1.pc.in ${PROJECT_BINARY_DIR}/yaml-0.1.pc @ONLY)
|
||||
+install(FILES ${PROJECT_BINARY_DIR}/yaml-0.1.pc DESTINATION lib/pkgconfig)
|
@ -8,21 +8,26 @@ vcpkg_from_github(
|
||||
REF 2c891fc7a770e8ba2fec34fc6b545c672beb37e6 # 0.2.5
|
||||
SHA512 7cdde7b48c937777b851747f7e0b9a74cb7da30173e09305dad931ef83c3fcee3e125e721166690fe6a0987ba897564500530e5518e4b66b1c9b1db8900bf320
|
||||
HEAD_REF master
|
||||
PATCHES ${PATCHES}
|
||||
PATCHES
|
||||
${PATCHES}
|
||||
export-pkgconfig.patch
|
||||
)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DBUILD_TESTING=OFF
|
||||
-DINSTALL_CMAKE_DIR=share/yaml
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_cmake_install()
|
||||
|
||||
vcpkg_fixup_cmake_targets(CONFIG_PATH share/yaml TARGET_PATH share/yaml)
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR}/include/config.h ${CURRENT_PACKAGES_DIR}/debug/share)
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME yaml CONFIG_PATH share/yaml)
|
||||
|
||||
configure_file(${SOURCE_PATH}/License ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/include/config.h" "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
||||
configure_file("${SOURCE_PATH}/License" "${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright" COPYONLY)
|
||||
|
@ -1,7 +1,17 @@
|
||||
{
|
||||
"name": "libyaml",
|
||||
"version-string": "0.2.5",
|
||||
"port-version": 1,
|
||||
"port-version": 2,
|
||||
"description": "A C library for parsing and emitting YAML.",
|
||||
"homepage": "https://github.com/yaml/libyaml"
|
||||
"homepage": "https://github.com/yaml/libyaml",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -4090,7 +4090,7 @@
|
||||
},
|
||||
"libyaml": {
|
||||
"baseline": "0.2.5",
|
||||
"port-version": 1
|
||||
"port-version": 2
|
||||
},
|
||||
"libyuv": {
|
||||
"baseline": "2021-04-15",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "888d62d1f7440f3c9c5ff403e85175372903c0ef",
|
||||
"version-string": "0.2.5",
|
||||
"port-version": 2
|
||||
},
|
||||
{
|
||||
"git-tree": "05217bc30337071036997a4d6152165823db9531",
|
||||
"version-string": "0.2.5",
|
||||
|
Loading…
x
Reference in New Issue
Block a user