mirror of https://github.com/microsoft/vcpkg.git
[libjxl] Remove libm dependency when building with MSVC (#46177)
This commit is contained in:
parent
813a779e69
commit
0cb95c860e
|
|
@ -0,0 +1,24 @@
|
|||
--- a/lib/jxl.cmake 2024-11-26 05:02:35.000000000 -0800
|
||||
+++ b/lib/jxl.cmake 2025-06-26 08:37:25.999263200 -0700
|
||||
@@ -269,12 +269,15 @@
|
||||
set(JPEGXL_LIBRARY_REQUIRES
|
||||
"libhwy libbrotlienc libbrotlidec libjxl_cms")
|
||||
|
||||
-if (BUILD_SHARED_LIBS)
|
||||
- set(JPEGXL_REQUIRES_TYPE "Requires.private")
|
||||
- set(JPEGXL_PRIVATE_LIBS "-lm ${PKGCONFIG_CXX_LIB}")
|
||||
-else()
|
||||
- set(JPEGXL_REQUIRES_TYPE "Requires")
|
||||
- set(JPEGXL_PUBLIC_LIBS "-lm ${PKGCONFIG_CXX_LIB}")
|
||||
+# MSVCRT bundles math functions
|
||||
+if(NOT MSVC)
|
||||
+ if (BUILD_SHARED_LIBS)
|
||||
+ set(JPEGXL_REQUIRES_TYPE "Requires.private")
|
||||
+ set(JPEGXL_PRIVATE_LIBS "-lm ${PKGCONFIG_CXX_LIB}")
|
||||
+ else()
|
||||
+ set(JPEGXL_REQUIRES_TYPE "Requires")
|
||||
+ set(JPEGXL_PUBLIC_LIBS "-lm ${PKGCONFIG_CXX_LIB}")
|
||||
+ endif()
|
||||
endif()
|
||||
|
||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/jxl/libjxl.pc.in"
|
||||
|
|
@ -6,7 +6,8 @@ vcpkg_from_github(
|
|||
HEAD_REF main
|
||||
PATCHES
|
||||
fix-dependencies.patch
|
||||
avoid-exe-linker-flags.patch # https://github.com/libjxl/libjxl/pull/4229
|
||||
avoid-exe-linker-flags.patch # https://github.com/libjxl/libjxl/pull/4229
|
||||
msvc-remove-libm.patch
|
||||
)
|
||||
|
||||
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "libjxl",
|
||||
"version-semver": "0.11.1",
|
||||
"port-version": 1,
|
||||
"port-version": 2,
|
||||
"description": "JPEG XL image format reference implementation",
|
||||
"homepage": "https://github.com/libjxl/libjxl",
|
||||
"license": "BSD-3-Clause",
|
||||
|
|
@ -17,6 +17,7 @@
|
|||
"features": {
|
||||
"tools": {
|
||||
"description": "Build user tools: cjxl and djxl",
|
||||
"supports": "!uwp",
|
||||
"dependencies": [
|
||||
"giflib",
|
||||
"libjpeg-turbo",
|
||||
|
|
|
|||
|
|
@ -4906,7 +4906,7 @@
|
|||
},
|
||||
"libjxl": {
|
||||
"baseline": "0.11.1",
|
||||
"port-version": 1
|
||||
"port-version": 2
|
||||
},
|
||||
"libkeyfinder": {
|
||||
"baseline": "2.2.8",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "1ff477143618a294bb1f624cc075c4ea42059377",
|
||||
"version-semver": "0.11.1",
|
||||
"port-version": 2
|
||||
},
|
||||
{
|
||||
"git-tree": "1f7903efa9347e989121781311287edb5f41592f",
|
||||
"version-semver": "0.11.1",
|
||||
|
|
|
|||
Loading…
Reference in New Issue