mirror of
https://github.com/microsoft/vcpkg
synced 2024-11-21 16:09:03 -07:00
[xmlsec] Update, fix usage (#27470)
* Update to 1.2.35 * vcpkg cmake config is unofficial * Update versions * Update to 1.2.36 * Update versions * Remove patch * Update versions
This commit is contained in:
parent
74a4c99417
commit
d5dd03b545
8 changed files with 51 additions and 12 deletions
|
@ -114,7 +114,11 @@ install(TARGETS xmlsec1 xmlsec1-openssl
|
|||
ARCHIVE DESTINATION lib
|
||||
)
|
||||
|
||||
install(EXPORT xmlsecExport FILE xmlsec-config.cmake DESTINATION share/xmlsec)
|
||||
install(EXPORT xmlsecExport
|
||||
FILE unofficial-xmlsec-config.cmake
|
||||
NAMESPACE unofficial::xmlsec::
|
||||
DESTINATION share/unofficial-xmlsec
|
||||
)
|
||||
|
||||
if(INSTALL_HEADERS_TOOLS)
|
||||
file(GLOB PUBLIC_HEADERS
|
||||
|
|
|
@ -15,7 +15,7 @@ index 2d5a3ad..0f72d68 100644
|
|||
@@ -7,5 +7,5 @@ Name: xmlsec1
|
||||
Version: @VERSION@
|
||||
Description: XML Security Library implements XML Signature and XML Encryption standards
|
||||
Requires: libxml-2.0 >= @LIBXML_MIN_VERSION@ @LIBXSLT_PC_FILE_COND@
|
||||
Requires: libxml-2.0 >= @LIBXML_MIN_VERSION@ @LIBXSLT_PC_FILE_COND@
|
||||
-Cflags: -DXMLSEC_CRYPTO_DYNAMIC_LOADING=1 @XMLSEC_CORE_CFLAGS@
|
||||
+Cflags: @XMLSEC_CORE_CFLAGS@
|
||||
Libs: -L${libdir} @XMLSEC_CORE_LIBS@
|
||||
Libs: -L${libdir} @XMLSEC_CORE_LIBS@
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
vcpkg_minimum_required(VERSION 2022-10-12) # for ${VERSION}
|
||||
|
||||
string(REPLACE "." "_" release_tag "xmlsec-${VERSION}")
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO lsh123/xmlsec
|
||||
REF d823da17c80b38ccc3c4262d7b2042b07e69e266 # xmlsec-1_2_34
|
||||
SHA512 10ca5cb948723fcf1531efaab547c0665bc323cd52906decd314e0c78fff46ac7bc51eba5177838fc7f081f74f5e4a202d765c17dd0da6e378798676773a68ce
|
||||
REF "${release_tag}"
|
||||
SHA512 c74c0854f0afdf97651cb8ae26430a43ebb7d849b7715fdec3abcd96e61f67f0d2bac82b68b10c97dc90ee52b14ba426bbf9413f71caa7de5fa6ecb945cba0d1
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
pkgconfig_fixes.patch
|
||||
)
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
|
||||
file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}")
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
|
@ -16,9 +19,12 @@ vcpkg_cmake_configure(
|
|||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_cmake_config_fixup()
|
||||
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-xmlsec)
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
file(INSTALL "${SOURCE_PATH}/Copyright" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
# unofficial legacy usage
|
||||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/xmlsec-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
|
||||
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
||||
file(INSTALL "${SOURCE_PATH}/Copyright" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
|
|
17
ports/xmlsec/usage
Normal file
17
ports/xmlsec/usage
Normal file
|
@ -0,0 +1,17 @@
|
|||
xmlsec can be imported via CMake FindPkgConfig module:
|
||||
|
||||
find_package(PkgConfig)
|
||||
# For dynamic loading of xmlsec crypto library
|
||||
pkg_check_modules(XMLSEC1 REQUIRED IMPORTED_TARGET xmlsec1)
|
||||
target_link_libraries(main PRIVATE PkgConfig::XMLSEC1)
|
||||
# For selecting the openssl crypto engine at link time
|
||||
pkg_check_modules(XMLSEC1_OPENSSL REQUIRED IMPORTED_TARGET xmlsec1-openssl)
|
||||
target_link_libraries(main PRIVATE PkgConfig::XMLSEC1_OPENSSL)
|
||||
|
||||
vcpkg provides proprietary CMake targets:
|
||||
|
||||
find_package(unofficial-xmlsec CONFIG REQUIRED)
|
||||
# For dynamic loading of xmlsec crypto library
|
||||
target_link_libraries(main PRIVATE unofficial::xmlsec::xmlsec1)
|
||||
# For selecting the openssl crypto engine at link time
|
||||
target_link_libraries(main PRIVATE unofficial::xmlsec::xmlsec1-openssl)
|
|
@ -1,8 +1,9 @@
|
|||
{
|
||||
"name": "xmlsec",
|
||||
"version": "1.2.34",
|
||||
"version": "1.2.36",
|
||||
"description": "XML Security Library is a C library based on LibXML2. The library supports major XML security standards.",
|
||||
"homepage": "https://www.aleksey.com/xmlsec/",
|
||||
"license": "X11 AND MPL-1.1",
|
||||
"dependencies": [
|
||||
"libxml2",
|
||||
"openssl",
|
||||
|
|
6
ports/xmlsec/xmlsec-config.cmake
Normal file
6
ports/xmlsec/xmlsec-config.cmake
Normal file
|
@ -0,0 +1,6 @@
|
|||
file(READ "${CMAKE_CURRENT_LIST_DIR}/usage" usage)
|
||||
message(WARNING "find_package(xmlsec) is deprecated.\n${usage}")
|
||||
include(CMakeFindDependencyMacro)
|
||||
find_dependency(unofficial-xmlsec CONFIG REQUIRED)
|
||||
add_library(xmlsec1 ALIAS unofficial::xmlsec::xmlsec1)
|
||||
add_library(xmlsec1-openssl ALIAS unofficial::xmlsec::xmlsec1-openssl)
|
|
@ -8089,7 +8089,7 @@
|
|||
"port-version": 1
|
||||
},
|
||||
"xmlsec": {
|
||||
"baseline": "1.2.34",
|
||||
"baseline": "1.2.36",
|
||||
"port-version": 0
|
||||
},
|
||||
"xnnpack": {
|
||||
|
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "3b3111c9880e6e3737f334dc37432a121a3220ef",
|
||||
"version": "1.2.36",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "a41c14aae637b02b4e018902e0f9b67bcdef12f2",
|
||||
"version": "1.2.34",
|
||||
|
|
Loading…
Reference in a new issue