Repository: microsoft/vcpkg
Pull request #43808: [xmlsec] Update to 1.3.7
Author: login: metsma
Labels: name: category:port-update
description: The issue is with a library, which is requesting update new revision
name: info:needs-maintainer-attention
description: Lets the current 'on rotation' vcpkg maintainer know they need to look at this.
Created: 2025-02-13T07:24:28Z | Merged: 2025-03-12T19:05:31Z

<!-- If your PR fixes issues, please note that here by adding "Fixes #NNNNNN." for each fixed issue on separate lines. -->

<!-- If you are still working on the PR, open it as a Draft: https://github.blog/2019-02-14-introducing-draft-pull-requests/. -->

- [x] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md).
- [x] SHA512s are updated for each updated download.
- [ ] The "supports" clause reflects platforms that may be fixed by this new version.
- [ ] Any fixed [CI baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt) entries are removed from that file.
- [ ] Any patches that are no longer applied are deleted from the port's directory.
- [x] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result.
- [x] Only one version is added to each modified port's versions file.

Signed-off-by: Raul Metsma <raul@metsma.ee>


Diff:
diff --git a/ports/xmlsec/CMakeLists.txt b/ports/xmlsec/CMakeLists.txt
index bbd9ea9d2ca356..29ad983d6079fc 100644
--- a/ports/xmlsec/CMakeLists.txt
+++ b/ports/xmlsec/CMakeLists.txt
@@ -68,34 +68,36 @@ target_include_directories(xmlsec1 PUBLIC
 target_link_libraries(xmlsec1 PUBLIC LibXml2::LibXml2)
 target_link_libraries(xmlsec1-openssl PUBLIC xmlsec1 OpenSSL::Crypto)
 
-add_compile_definitions(inline=__inline)
-add_compile_definitions(PACKAGE="xmlsec1")
-add_compile_definitions(HAVE_STDIO_H)
-add_compile_definitions(HAVE_STDLIB_H)
-add_compile_definitions(HAVE_STRING_H)
-add_compile_definitions(HAVE_CTYPE_H)
-add_compile_definitions(HAVE_MALLOC_H)
-add_compile_definitions(HAVE_MEMORY_H)
-add_compile_definitions(XMLSEC_DEFAULT_CRYPTO="openssl")
-add_compile_definitions(UNICODE)
-add_compile_definitions(_UNICODE)
-add_compile_definitions(_MBCS)
-add_compile_definitions(_REENTRANT)
+add_compile_definitions(
+	inline=__inline
+	PACKAGE="xmlsec1"
+	HAVE_STDIO_H
+	HAVE_STDLIB_H
+	HAVE_STRING_H
+	HAVE_CTYPE_H
+	HAVE_MALLOC_H
+	HAVE_MEMORY_H
+	XMLSEC_DEFAULT_CRYPTO="openssl"
+	UNICODE
+	_UNICODE
+	_MBCS
+	_REENTRANT
+	WIN32_LEAN_AND_MEAN
+)
 
 set_target_properties(xmlsec1 xmlsec1-openssl PROPERTIES VERSION ${XMLSEC_VERSION_MAJOR}.${XMLSEC_VERSION_MINOR})
 
-set(XMLSEC_CORE_CFLAGS "")
+set(XMLSEC_CORE_CFLAGS XMLSEC_NO_XSLT XMLSEC_CRYPTO_OPENSSL XMLSEC_NO_FTP XMLSEC_NO_HTTP)
 if(NOT BUILD_SHARED_LIBS)
-    set(XMLSEC_CORE_CFLAGS "-DLIBXML_STATIC -DXMLSEC_STATIC -DXMLSEC_NO_CRYPTO_DYNAMIC_LOADING")
-    target_compile_definitions(xmlsec1 PUBLIC XMLSEC_STATIC XMLSEC_NO_CRYPTO_DYNAMIC_LOADING)
+    list(APPEND XMLSEC_CORE_CFLAGS XMLSEC_STATIC XMLSEC_NO_CRYPTO_DYNAMIC_LOADING)
 endif()
-set(XMLSEC_OPENSSL_CFLAGS ${XMLSEC_CORE_CFLAGS})
+set(XMLSEC_OPENSSL_CFLAGS XMLSEC_NO_MD5 XMLSEC_NO_RIPEMD160 XMLSEC_NO_GOST XMLSEC_NO_GOST2012)
 
 target_compile_definitions(xmlsec1
     PRIVATE $<$<PLATFORM_ID:Windows>:XMLSEC_DL_WIN32>
-    PUBLIC XMLSEC_NO_XSLT XMLSEC_CRYPTO_OPENSSL
+    PUBLIC ${XMLSEC_CORE_CFLAGS} 
 )
-target_compile_definitions(xmlsec1-openssl PUBLIC XMLSEC_NO_GOST XMLSEC_NO_GOST2012)
+target_compile_definitions(xmlsec1-openssl PUBLIC ${XMLSEC_OPENSSL_CFLAGS})
 
 install(TARGETS xmlsec1 xmlsec1-openssl
     EXPORT unofficial-xmlsec-targets
@@ -153,11 +155,12 @@ set(libdir ${prefix}/${CMAKE_INSTALL_LIBDIR})
 set(includedir ${prefix}/${CMAKE_INSTALL_INCLUDEDIR})
 set(VERSION ${XMLSEC_VERSION})
 set(LIBXML_MIN_VERSION ${LIBXML2_VERSION_STRING})
-set(OPENSSL_LIBS "-lcrypto")
-set(XMLSEC_CORE_CFLAGS "${XMLSEC_CORE_CFLAGS} -DXMLSEC_DL_LIBLTDL=1 -I\${includedir}/xmlsec1 -DXMLSEC_CRYPTO_OPENSSL=1")
+list(JOIN XMLSEC_CORE_CFLAGS " -D" XMLSEC_CORE_CFLAGS)
+set(XMLSEC_CORE_CFLAGS "-D${XMLSEC_CORE_CFLAGS} -I\${includedir}/xmlsec1")
 set(XMLSEC_CORE_LIBS "-lxmlsec1 -lltdl")
-set(XMLSEC_OPENSSL_CFLAGS "${XMLSEC_OPENSSL_CFLAGS} -I\${includedir}/xmlsec1")
-set(XMLSEC_OPENSSL_LIBS "-L\${libdir} -lxmlsec1-openssl ${XMLSEC_CORE_LIBS} ${OPENSSL_LIBS}")
+list(JOIN XMLSEC_OPENSSL_CFLAGS " -D" XMLSEC_OPENSSL_CFLAGS)
+set(XMLSEC_OPENSSL_CFLAGS "${XMLSEC_CORE_CFLAGS} -D${XMLSEC_OPENSSL_CFLAGS}")
+set(XMLSEC_OPENSSL_LIBS "-L\${libdir} -lxmlsec1-openssl ${XMLSEC_CORE_LIBS} -lcrypto")
 
 configure_file(${PROJECT_SOURCE_DIR}/xmlsec.pc.in ${PROJECT_BINARY_DIR}/xmlsec1.pc @ONLY)
 configure_file(${PROJECT_SOURCE_DIR}/xmlsec-openssl.pc.in ${PROJECT_BINARY_DIR}/xmlsec1-openssl.pc @ONLY)
diff --git a/ports/xmlsec/portfile.cmake b/ports/xmlsec/portfile.cmake
index 5410e3da631ae0..79aa40d7f4dd1e 100644
--- a/ports/xmlsec/portfile.cmake
+++ b/ports/xmlsec/portfile.cmake
@@ -5,7 +5,7 @@ vcpkg_from_github(
     OUT_SOURCE_PATH SOURCE_PATH
     REPO lsh123/xmlsec
     REF "${release_tag}"
-    SHA512 6e41c35042e5a74e135cfb7468aa5c09b3c9ba684ab2431ecedce950f7c99c92fc8765c1c8c2ddfd87718bd00f4a287028227da1e987f2ef17ce2594356e81af
+    SHA512 28130c10d79f652e3533e6ede5fdaab0f6db5a4bbaaca4713b62df9af2ae2d5314acf82d01f344f87faf95c12099fd77e0858cbe5232a96de1d531e6284ede1b
     HEAD_REF master
     PATCHES 
         pkgconfig_fixes.patch
diff --git a/ports/xmlsec/vcpkg.json b/ports/xmlsec/vcpkg.json
index c504e7733c8a7a..719aea949bead3 100644
--- a/ports/xmlsec/vcpkg.json
+++ b/ports/xmlsec/vcpkg.json
@@ -1,6 +1,6 @@
 {
   "name": "xmlsec",
-  "version": "1.3.6",
+  "version": "1.3.7",
   "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",
diff --git a/versions/baseline.json b/versions/baseline.json
index 30a0b6a2ea471b..836a00057b211c 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -9993,7 +9993,7 @@
       "port-version": 0
     },
     "xmlsec": {
-      "baseline": "1.3.6",
+      "baseline": "1.3.7",
       "port-version": 0
     },
     "xnnpack": {
diff --git a/versions/x-/xmlsec.json b/versions/x-/xmlsec.json
index 0ad0e95569c66f..1549c2cf8d7ca4 100644
--- a/versions/x-/xmlsec.json
+++ b/versions/x-/xmlsec.json
@@ -1,5 +1,10 @@
 {
   "versions": [
+    {
+      "git-tree": "981d2bea8296b17959768d20e8842643870b4cb6",
+      "version": "1.3.7",
+      "port-version": 0
+    },
     {
       "git-tree": "53a0926b6c125320e29773130a9992c43cfd9815",
       "version": "1.3.6",


Reviews:
user: login: BillyONeal
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-02-14T03:14:59Z
user: login: metsma
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-02-14T05:56:46Z
user: login: dg0yt
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-02-14T06:04:18Z
user: login: metsma
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-02-14T07:02:10Z
user: login: BillyONeal
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-02-14T18:01:48Z
user: login: metsma
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-02-14T18:15:35Z
user: login: metsma
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-02-19T07:15:37Z
user: login: BillyONeal
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-02-20T00:05:06Z
user: login: metsma
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-02-20T06:31:27Z
user: login: metsma
state: COMMENTED
author_association: CONTRIBUTOR
submitted_at: 2025-03-05T12:42:38Z
user: login: BillyONeal
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-12T18:13:58Z
user: login: BillyONeal
state: COMMENTED
author_association: MEMBER
submitted_at: 2025-03-12T18:25:29Z

Review comments:
diff_hunk: @@ -153,11 +155,12 @@ set(libdir ${prefix}/${CMAKE_INSTALL_LIBDIR})
 set(includedir ${prefix}/${CMAKE_INSTALL_INCLUDEDIR})
 set(VERSION ${XMLSEC_VERSION})
 set(LIBXML_MIN_VERSION ${LIBXML2_VERSION_STRING})
-set(OPENSSL_LIBS "-lcrypto")
-set(XMLSEC_CORE_CFLAGS "${XMLSEC_CORE_CFLAGS} -DXMLSEC_DL_LIBLTDL=1 -I\${includedir}/xmlsec1 -DXMLSEC_CRYPTO_OPENSSL=1")
+list(JOIN XMLSEC_CORE_CFLAGS " -D" XMLSEC_CORE_CFLAGS)
+set(XMLSEC_CORE_CFLAGS "-D${XMLSEC_CORE_CFLAGS} -I\${includedir}/xmlsec1")
 set(XMLSEC_CORE_LIBS "-lxmlsec1 -lltdl")
-set(XMLSEC_OPENSSL_CFLAGS "${XMLSEC_OPENSSL_CFLAGS} -I\${includedir}/xmlsec1")
-set(XMLSEC_OPENSSL_LIBS "-L\${libdir} -lxmlsec1-openssl ${XMLSEC_CORE_LIBS} ${OPENSSL_LIBS}")
+list(JOIN XMLSEC_OPENSSL_CFLAGS " -D" XMLSEC_OPENSSL_CFLAGS)
path: ports/xmlsec/CMakeLists.txt
user: login: BillyONeal
body: Why isn't this OpenSSL stuff coming from `find_package`? (I'm not saying this wrong per se, I just want to make sure I have an understanding of what's going on here before reviewing it incorrectly 😅)
created_at: 2025-02-14T03:14:59Z
author_association: MEMBER
diff_hunk: @@ -153,11 +155,12 @@ set(libdir ${prefix}/${CMAKE_INSTALL_LIBDIR})
 set(includedir ${prefix}/${CMAKE_INSTALL_INCLUDEDIR})
 set(VERSION ${XMLSEC_VERSION})
 set(LIBXML_MIN_VERSION ${LIBXML2_VERSION_STRING})
-set(OPENSSL_LIBS "-lcrypto")
-set(XMLSEC_CORE_CFLAGS "${XMLSEC_CORE_CFLAGS} -DXMLSEC_DL_LIBLTDL=1 -I\${includedir}/xmlsec1 -DXMLSEC_CRYPTO_OPENSSL=1")
+list(JOIN XMLSEC_CORE_CFLAGS " -D" XMLSEC_CORE_CFLAGS)
+set(XMLSEC_CORE_CFLAGS "-D${XMLSEC_CORE_CFLAGS} -I\${includedir}/xmlsec1")
 set(XMLSEC_CORE_LIBS "-lxmlsec1 -lltdl")
-set(XMLSEC_OPENSSL_CFLAGS "${XMLSEC_OPENSSL_CFLAGS} -I\${includedir}/xmlsec1")
-set(XMLSEC_OPENSSL_LIBS "-L\${libdir} -lxmlsec1-openssl ${XMLSEC_CORE_LIBS} ${OPENSSL_LIBS}")
+list(JOIN XMLSEC_OPENSSL_CFLAGS " -D" XMLSEC_OPENSSL_CFLAGS)
path: ports/xmlsec/CMakeLists.txt
user: login: metsma
body: I am really not that familiar with pkg-config. Is there some sort of dependency system?
Upstream hardcodes also flags to pkg-config files.
created_at: 2025-02-14T05:56:46Z
author_association: CONTRIBUTOR
diff_hunk: @@ -153,11 +155,12 @@ set(libdir ${prefix}/${CMAKE_INSTALL_LIBDIR})
 set(includedir ${prefix}/${CMAKE_INSTALL_INCLUDEDIR})
 set(VERSION ${XMLSEC_VERSION})
 set(LIBXML_MIN_VERSION ${LIBXML2_VERSION_STRING})
-set(OPENSSL_LIBS "-lcrypto")
-set(XMLSEC_CORE_CFLAGS "${XMLSEC_CORE_CFLAGS} -DXMLSEC_DL_LIBLTDL=1 -I\${includedir}/xmlsec1 -DXMLSEC_CRYPTO_OPENSSL=1")
+list(JOIN XMLSEC_CORE_CFLAGS " -D" XMLSEC_CORE_CFLAGS)
+set(XMLSEC_CORE_CFLAGS "-D${XMLSEC_CORE_CFLAGS} -I\${includedir}/xmlsec1")
 set(XMLSEC_CORE_LIBS "-lxmlsec1 -lltdl")
-set(XMLSEC_OPENSSL_CFLAGS "${XMLSEC_OPENSSL_CFLAGS} -I\${includedir}/xmlsec1")
-set(XMLSEC_OPENSSL_LIBS "-L\${libdir} -lxmlsec1-openssl ${XMLSEC_CORE_LIBS} ${OPENSSL_LIBS}")
+list(JOIN XMLSEC_OPENSSL_CFLAGS " -D" XMLSEC_OPENSSL_CFLAGS)
path: ports/xmlsec/CMakeLists.txt
user: login: dg0yt
body: The pkg-config dependency system is the `Requires` and `Requires.private` fields.

(Isn't it possible to use `vcpkg-make` instead of maintaining a vcpkg CMakeLists.txt?)
created_at: 2025-02-14T06:04:18Z
author_association: CONTRIBUTOR
diff_hunk: @@ -153,11 +155,12 @@ set(libdir ${prefix}/${CMAKE_INSTALL_LIBDIR})
 set(includedir ${prefix}/${CMAKE_INSTALL_INCLUDEDIR})
 set(VERSION ${XMLSEC_VERSION})
 set(LIBXML_MIN_VERSION ${LIBXML2_VERSION_STRING})
-set(OPENSSL_LIBS "-lcrypto")
-set(XMLSEC_CORE_CFLAGS "${XMLSEC_CORE_CFLAGS} -DXMLSEC_DL_LIBLTDL=1 -I\${includedir}/xmlsec1 -DXMLSEC_CRYPTO_OPENSSL=1")
+list(JOIN XMLSEC_CORE_CFLAGS " -D" XMLSEC_CORE_CFLAGS)
+set(XMLSEC_CORE_CFLAGS "-D${XMLSEC_CORE_CFLAGS} -I\${includedir}/xmlsec1")
 set(XMLSEC_CORE_LIBS "-lxmlsec1 -lltdl")
-set(XMLSEC_OPENSSL_CFLAGS "${XMLSEC_OPENSSL_CFLAGS} -I\${includedir}/xmlsec1")
-set(XMLSEC_OPENSSL_LIBS "-L\${libdir} -lxmlsec1-openssl ${XMLSEC_CORE_LIBS} ${OPENSSL_LIBS}")
+list(JOIN XMLSEC_OPENSSL_CFLAGS " -D" XMLSEC_OPENSSL_CFLAGS)
path: ports/xmlsec/CMakeLists.txt
user: login: metsma
body: I just noticed that pkg-config files were out of sync with cmake parameters and improve current situation.
created_at: 2025-02-14T07:02:10Z
author_association: CONTRIBUTOR
diff_hunk: @@ -153,11 +155,12 @@ set(libdir ${prefix}/${CMAKE_INSTALL_LIBDIR})
 set(includedir ${prefix}/${CMAKE_INSTALL_INCLUDEDIR})
 set(VERSION ${XMLSEC_VERSION})
 set(LIBXML_MIN_VERSION ${LIBXML2_VERSION_STRING})
-set(OPENSSL_LIBS "-lcrypto")
-set(XMLSEC_CORE_CFLAGS "${XMLSEC_CORE_CFLAGS} -DXMLSEC_DL_LIBLTDL=1 -I\${includedir}/xmlsec1 -DXMLSEC_CRYPTO_OPENSSL=1")
+list(JOIN XMLSEC_CORE_CFLAGS " -D" XMLSEC_CORE_CFLAGS)
+set(XMLSEC_CORE_CFLAGS "-D${XMLSEC_CORE_CFLAGS} -I\${includedir}/xmlsec1")
 set(XMLSEC_CORE_LIBS "-lxmlsec1 -lltdl")
-set(XMLSEC_OPENSSL_CFLAGS "${XMLSEC_OPENSSL_CFLAGS} -I\${includedir}/xmlsec1")
-set(XMLSEC_OPENSSL_LIBS "-L\${libdir} -lxmlsec1-openssl ${XMLSEC_CORE_LIBS} ${OPENSSL_LIBS}")
+list(JOIN XMLSEC_OPENSSL_CFLAGS " -D" XMLSEC_OPENSSL_CFLAGS)
path: ports/xmlsec/CMakeLists.txt
user: login: BillyONeal
body: > (Isn't it possible to use vcpkg-make instead of maintaining a vcpkg CMakeLists.txt?)

The make handling has gotten a LOT better over time; if we can use upstream's build system we should if at all possible though. I don't think we should block someone trying to do a 'simple update' on changing the build system but this seems to already be doing a lot of surgery.
created_at: 2025-02-14T18:01:47Z
author_association: MEMBER
diff_hunk: @@ -153,11 +155,12 @@ set(libdir ${prefix}/${CMAKE_INSTALL_LIBDIR})
 set(includedir ${prefix}/${CMAKE_INSTALL_INCLUDEDIR})
 set(VERSION ${XMLSEC_VERSION})
 set(LIBXML_MIN_VERSION ${LIBXML2_VERSION_STRING})
-set(OPENSSL_LIBS "-lcrypto")
-set(XMLSEC_CORE_CFLAGS "${XMLSEC_CORE_CFLAGS} -DXMLSEC_DL_LIBLTDL=1 -I\${includedir}/xmlsec1 -DXMLSEC_CRYPTO_OPENSSL=1")
+list(JOIN XMLSEC_CORE_CFLAGS " -D" XMLSEC_CORE_CFLAGS)
+set(XMLSEC_CORE_CFLAGS "-D${XMLSEC_CORE_CFLAGS} -I\${includedir}/xmlsec1")
 set(XMLSEC_CORE_LIBS "-lxmlsec1 -lltdl")
-set(XMLSEC_OPENSSL_CFLAGS "${XMLSEC_OPENSSL_CFLAGS} -I\${includedir}/xmlsec1")
-set(XMLSEC_OPENSSL_LIBS "-L\${libdir} -lxmlsec1-openssl ${XMLSEC_CORE_LIBS} ${OPENSSL_LIBS}")
+list(JOIN XMLSEC_OPENSSL_CFLAGS " -D" XMLSEC_OPENSSL_CFLAGS)
path: ports/xmlsec/CMakeLists.txt
user: login: metsma
body: Upstream uses some homebrewed build scripts on windows https://github.com/lsh123/xmlsec/blob/master/win32/configure.js
created_at: 2025-02-14T18:15:35Z
author_association: CONTRIBUTOR
diff_hunk: @@ -153,11 +155,12 @@ set(libdir ${prefix}/${CMAKE_INSTALL_LIBDIR})
 set(includedir ${prefix}/${CMAKE_INSTALL_INCLUDEDIR})
 set(VERSION ${XMLSEC_VERSION})
 set(LIBXML_MIN_VERSION ${LIBXML2_VERSION_STRING})
-set(OPENSSL_LIBS "-lcrypto")
-set(XMLSEC_CORE_CFLAGS "${XMLSEC_CORE_CFLAGS} -DXMLSEC_DL_LIBLTDL=1 -I\${includedir}/xmlsec1 -DXMLSEC_CRYPTO_OPENSSL=1")
+list(JOIN XMLSEC_CORE_CFLAGS " -D" XMLSEC_CORE_CFLAGS)
+set(XMLSEC_CORE_CFLAGS "-D${XMLSEC_CORE_CFLAGS} -I\${includedir}/xmlsec1")
 set(XMLSEC_CORE_LIBS "-lxmlsec1 -lltdl")
-set(XMLSEC_OPENSSL_CFLAGS "${XMLSEC_OPENSSL_CFLAGS} -I\${includedir}/xmlsec1")
-set(XMLSEC_OPENSSL_LIBS "-L\${libdir} -lxmlsec1-openssl ${XMLSEC_CORE_LIBS} ${OPENSSL_LIBS}")
+list(JOIN XMLSEC_OPENSSL_CFLAGS " -D" XMLSEC_OPENSSL_CFLAGS)
path: ports/xmlsec/CMakeLists.txt
user: login: metsma
body: Can we get this merged? I am not really familiar with pkg-config but this change least improves current situation.
created_at: 2025-02-19T07:15:37Z
author_association: CONTRIBUTOR
diff_hunk: @@ -153,11 +155,12 @@ set(libdir ${prefix}/${CMAKE_INSTALL_LIBDIR})
 set(includedir ${prefix}/${CMAKE_INSTALL_INCLUDEDIR})
 set(VERSION ${XMLSEC_VERSION})
 set(LIBXML_MIN_VERSION ${LIBXML2_VERSION_STRING})
-set(OPENSSL_LIBS "-lcrypto")
-set(XMLSEC_CORE_CFLAGS "${XMLSEC_CORE_CFLAGS} -DXMLSEC_DL_LIBLTDL=1 -I\${includedir}/xmlsec1 -DXMLSEC_CRYPTO_OPENSSL=1")
+list(JOIN XMLSEC_CORE_CFLAGS " -D" XMLSEC_CORE_CFLAGS)
+set(XMLSEC_CORE_CFLAGS "-D${XMLSEC_CORE_CFLAGS} -I\${includedir}/xmlsec1")
 set(XMLSEC_CORE_LIBS "-lxmlsec1 -lltdl")
-set(XMLSEC_OPENSSL_CFLAGS "${XMLSEC_OPENSSL_CFLAGS} -I\${includedir}/xmlsec1")
-set(XMLSEC_OPENSSL_LIBS "-L\${libdir} -lxmlsec1-openssl ${XMLSEC_CORE_LIBS} ${OPENSSL_LIBS}")
+list(JOIN XMLSEC_OPENSSL_CFLAGS " -D" XMLSEC_OPENSSL_CFLAGS)
path: ports/xmlsec/CMakeLists.txt
user: login: BillyONeal
body: I guess, I'm not sure it does improve the current situation? This can't seem to make up its mind about whether it wants OpenSSL::OpenSSL or to hard code `-lcrypto` and friends. It seems like that can't be correct.

I'm all for 'code that isn't green doesn't necessarily have to change even if it does unfortunate things' but you made this code green :)
created_at: 2025-02-20T00:05:06Z
author_association: MEMBER
diff_hunk: @@ -153,11 +155,12 @@ set(libdir ${prefix}/${CMAKE_INSTALL_LIBDIR})
 set(includedir ${prefix}/${CMAKE_INSTALL_INCLUDEDIR})
 set(VERSION ${XMLSEC_VERSION})
 set(LIBXML_MIN_VERSION ${LIBXML2_VERSION_STRING})
-set(OPENSSL_LIBS "-lcrypto")
-set(XMLSEC_CORE_CFLAGS "${XMLSEC_CORE_CFLAGS} -DXMLSEC_DL_LIBLTDL=1 -I\${includedir}/xmlsec1 -DXMLSEC_CRYPTO_OPENSSL=1")
+list(JOIN XMLSEC_CORE_CFLAGS " -D" XMLSEC_CORE_CFLAGS)
+set(XMLSEC_CORE_CFLAGS "-D${XMLSEC_CORE_CFLAGS} -I\${includedir}/xmlsec1")
 set(XMLSEC_CORE_LIBS "-lxmlsec1 -lltdl")
-set(XMLSEC_OPENSSL_CFLAGS "${XMLSEC_OPENSSL_CFLAGS} -I\${includedir}/xmlsec1")
-set(XMLSEC_OPENSSL_LIBS "-L\${libdir} -lxmlsec1-openssl ${XMLSEC_CORE_LIBS} ${OPENSSL_LIBS}")
+list(JOIN XMLSEC_OPENSSL_CFLAGS " -D" XMLSEC_OPENSSL_CFLAGS)
path: ports/xmlsec/CMakeLists.txt
user: login: metsma
body: I'm not sure I follow. Here's an example showing that the pkg-config vs cmake files  are missing the compile definitions used. If this change is distracting, I can revert to the previous setup.
Current:
```
Name: xmlsec1
Version: 1.3.6
Description: XML Security Library implements XML Signature and XML Encryption standards
Requires: libxml-2.0 >= 2.13.5 
Cflags:  -DXMLSEC_DL_LIBLTDL=1 "-I${includedir}/xmlsec1" -DXMLSEC_CRYPTO_OPENSSL=1
Libs: "-L${libdir}" -lxmlsec1 -lltdl

Name: xmlsec1-openssl
Version: 1.3.6
Description: XML Security Library implements XML Signature and XML Encryption standards
Requires: libxml-2.0 >= 2.13.5 
Cflags:  "-I${includedir}/xmlsec1"
Libs: "-L${libdir}" -lxmlsec1-openssl -lxmlsec1 -lltdl -lcrypto


set_target_properties(unofficial::xmlsec::xmlsec1 PROPERTIES
  INTERFACE_COMPILE_DEFINITIONS "XMLSEC_NO_XSLT;XMLSEC_CRYPTO_OPENSSL"
  INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
  INTERFACE_LINK_LIBRARIES "LibXml2::LibXml2"
)

set_target_properties(unofficial::xmlsec::xmlsec1-openssl PROPERTIES
  INTERFACE_COMPILE_DEFINITIONS "XMLSEC_NO_GOST;XMLSEC_NO_GOST2012"
  INTERFACE_LINK_LIBRARIES "unofficial::xmlsec::xmlsec1;OpenSSL::Crypto"
)
```
New:
```
Name: xmlsec1
Version: 1.3.7
Description: XML Security Library implements XML Signature and XML Encryption standards
Requires: libxml-2.0 >= 2.13.5 
Cflags: -DXMLSEC_NO_XSLT -DXMLSEC_CRYPTO_OPENSSL "-I${includedir}/xmlsec1"
Libs: "-L${libdir}" -lxmlsec1 -lltdl

Name: xmlsec1-openssl
Version: 1.3.7
Description: XML Security Library implements XML Signature and XML Encryption standards
Requires: libxml-2.0 >= 2.13.5 
Cflags: -DXMLSEC_NO_XSLT -DXMLSEC_CRYPTO_OPENSSL "-I${includedir}/xmlsec1" -DXMLSEC_NO_MD5 -DXMLSEC_NO_RIPEMD160 -DXMLSEC_NO_GOST -DXMLSEC_NO_GOST2012
Libs: "-L${libdir}" -lxmlsec1-openssl -lxmlsec1 -lltdl -lcrypto


set_target_properties(unofficial::xmlsec::xmlsec1 PROPERTIES
  INTERFACE_COMPILE_DEFINITIONS "XMLSEC_NO_XSLT;XMLSEC_CRYPTO_OPENSSL"
  INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
  INTERFACE_LINK_LIBRARIES "LibXml2::LibXml2"
)

set_target_properties(unofficial::xmlsec::xmlsec1-openssl PROPERTIES
  INTERFACE_COMPILE_DEFINITIONS "XMLSEC_NO_MD5;XMLSEC_NO_RIPEMD160;XMLSEC_NO_GOST;XMLSEC_NO_GOST2012"
  INTERFACE_LINK_LIBRARIES "unofficial::xmlsec::xmlsec1;OpenSSL::Crypto"
)
```
created_at: 2025-02-20T06:31:27Z
author_association: CONTRIBUTOR
diff_hunk: @@ -153,11 +155,12 @@ set(libdir ${prefix}/${CMAKE_INSTALL_LIBDIR})
 set(includedir ${prefix}/${CMAKE_INSTALL_INCLUDEDIR})
 set(VERSION ${XMLSEC_VERSION})
 set(LIBXML_MIN_VERSION ${LIBXML2_VERSION_STRING})
-set(OPENSSL_LIBS "-lcrypto")
-set(XMLSEC_CORE_CFLAGS "${XMLSEC_CORE_CFLAGS} -DXMLSEC_DL_LIBLTDL=1 -I\${includedir}/xmlsec1 -DXMLSEC_CRYPTO_OPENSSL=1")
+list(JOIN XMLSEC_CORE_CFLAGS " -D" XMLSEC_CORE_CFLAGS)
+set(XMLSEC_CORE_CFLAGS "-D${XMLSEC_CORE_CFLAGS} -I\${includedir}/xmlsec1")
 set(XMLSEC_CORE_LIBS "-lxmlsec1 -lltdl")
-set(XMLSEC_OPENSSL_CFLAGS "${XMLSEC_OPENSSL_CFLAGS} -I\${includedir}/xmlsec1")
-set(XMLSEC_OPENSSL_LIBS "-L\${libdir} -lxmlsec1-openssl ${XMLSEC_CORE_LIBS} ${OPENSSL_LIBS}")
+list(JOIN XMLSEC_OPENSSL_CFLAGS " -D" XMLSEC_OPENSSL_CFLAGS)
path: ports/xmlsec/CMakeLists.txt
user: login: metsma
body: Maybe it is easier dump the pkg-config changes to get the version pump accepted?
created_at: 2025-03-05T12:42:38Z
author_association: CONTRIBUTOR
diff_hunk: @@ -153,11 +155,12 @@ set(libdir ${prefix}/${CMAKE_INSTALL_LIBDIR})
 set(includedir ${prefix}/${CMAKE_INSTALL_INCLUDEDIR})
 set(VERSION ${XMLSEC_VERSION})
 set(LIBXML_MIN_VERSION ${LIBXML2_VERSION_STRING})
-set(OPENSSL_LIBS "-lcrypto")
-set(XMLSEC_CORE_CFLAGS "${XMLSEC_CORE_CFLAGS} -DXMLSEC_DL_LIBLTDL=1 -I\${includedir}/xmlsec1 -DXMLSEC_CRYPTO_OPENSSL=1")
+list(JOIN XMLSEC_CORE_CFLAGS " -D" XMLSEC_CORE_CFLAGS)
+set(XMLSEC_CORE_CFLAGS "-D${XMLSEC_CORE_CFLAGS} -I\${includedir}/xmlsec1")
 set(XMLSEC_CORE_LIBS "-lxmlsec1 -lltdl")
-set(XMLSEC_OPENSSL_CFLAGS "${XMLSEC_OPENSSL_CFLAGS} -I\${includedir}/xmlsec1")
-set(XMLSEC_OPENSSL_LIBS "-L\${libdir} -lxmlsec1-openssl ${XMLSEC_CORE_LIBS} ${OPENSSL_LIBS}")
+list(JOIN XMLSEC_OPENSSL_CFLAGS " -D" XMLSEC_OPENSSL_CFLAGS)
path: ports/xmlsec/CMakeLists.txt
user: login: BillyONeal
body: OK, I think you've shown that the output at least isn't worse than what was here before.
created_at: 2025-03-12T18:13:58Z
author_association: MEMBER
diff_hunk: @@ -153,11 +155,12 @@ set(libdir ${prefix}/${CMAKE_INSTALL_LIBDIR})
 set(includedir ${prefix}/${CMAKE_INSTALL_INCLUDEDIR})
 set(VERSION ${XMLSEC_VERSION})
 set(LIBXML_MIN_VERSION ${LIBXML2_VERSION_STRING})
-set(OPENSSL_LIBS "-lcrypto")
-set(XMLSEC_CORE_CFLAGS "${XMLSEC_CORE_CFLAGS} -DXMLSEC_DL_LIBLTDL=1 -I\${includedir}/xmlsec1 -DXMLSEC_CRYPTO_OPENSSL=1")
+list(JOIN XMLSEC_CORE_CFLAGS " -D" XMLSEC_CORE_CFLAGS)
+set(XMLSEC_CORE_CFLAGS "-D${XMLSEC_CORE_CFLAGS} -I\${includedir}/xmlsec1")
 set(XMLSEC_CORE_LIBS "-lxmlsec1 -lltdl")
-set(XMLSEC_OPENSSL_CFLAGS "${XMLSEC_OPENSSL_CFLAGS} -I\${includedir}/xmlsec1")
-set(XMLSEC_OPENSSL_LIBS "-L\${libdir} -lxmlsec1-openssl ${XMLSEC_CORE_LIBS} ${OPENSSL_LIBS}")
+list(JOIN XMLSEC_OPENSSL_CFLAGS " -D" XMLSEC_OPENSSL_CFLAGS)
path: ports/xmlsec/CMakeLists.txt
user: login: BillyONeal
body: (But I still think the correct thing to do is to `get_target_properties` or similar what the real flags should be out of `OpenSSL::OpenSSL` rather than assuming it will be exactly `-lcrypto`)
created_at: 2025-03-12T18:25:23Z
author_association: MEMBER

PR comments:
user: login: JavierMatosD
created_at: 2025-03-12T19:05:23Z
body: I believe that https://github.com/microsoft/vcpkg/pull/43808#discussion_r1992072687 is still true, but I believe this is out of scope for a port update. 
author_association: CONTRIBUTOR