From 1c04b1f0efd85f00cbc079c7dbe90b6542bd5e3e Mon Sep 17 00:00:00 2001 From: tobtoht Date: Wed, 19 Jul 2023 21:20:18 +0200 Subject: [PATCH] depends: qt: cleanup wmf lib handling --- contrib/depends/packages/qt.mk | 24 +--------------------- contrib/depends/patches/qt/toolchain.cmake | 4 ++++ 2 files changed, 5 insertions(+), 23 deletions(-) diff --git a/contrib/depends/packages/qt.mk b/contrib/depends/packages/qt.mk index 783c5e0..f80a4d8 100644 --- a/contrib/depends/packages/qt.mk +++ b/contrib/depends/packages/qt.mk @@ -183,6 +183,7 @@ define $(package)_preprocess_cmds -e 's|@host_prefix@|$(host_prefix)|' \ -e 's|@cmake_c_flags@|$(darwin_CC_)|' \ -e 's|@cmake_cxx_flags@|$(darwin_CXX_)|' \ + -e 's|@wmf_libs@|$(WMF_LIBS)|' \ toolchain.cmake && \ cd qtbase && \ patch -p1 -i $($(package)_patch_dir)/revert_f99ee441.patch && \ @@ -193,28 +194,6 @@ define $(package)_preprocess_cmds patch -p1 -i $($(package)_patch_dir)/v4l2.patch endef -# TODO: find a better way to make WMF libraries available to Qt without polluting the environment -ifeq ($(host_os),mingw32) -define $(package)_config_cmds - cp $(WMF_LIBS)/lib/libstrmiids.a \ - $(WMF_LIBS)/lib/libamstrmid.a \ - $(WMF_LIBS)/lib/libdmoguids.a \ - $(WMF_LIBS)/lib/libuuid.a \ - $(WMF_LIBS)/lib/libmsdmo.a \ - $(WMF_LIBS)/lib/libole32.a \ - $(WMF_LIBS)/lib/liboleaut32.a \ - $(WMF_LIBS)/lib/libmf.a \ - $(WMF_LIBS)/lib/libmfuuid.a \ - $(WMF_LIBS)/lib/libmfplat.a \ - $(WMF_LIBS)/lib/libmfcore.a \ - $(WMF_LIBS)/lib/libpropsys.a \ - /feather/contrib/depends/x86_64-w64-mingw32/lib/ && \ - export OPENSSL_LIBS=${$(package)_openssl_flags_$(host_os)} \ - export PKG_CONFIG_SYSROOT_DIR=/ && \ - export PKG_CONFIG_LIBDIR=$(host_prefix)/lib/pkgconfig && \ - cmake -DCMAKE_LIBRARY_PATH=$(HOME)/.guix-profile/lib $($(package)_config_opts) -endef -else define $(package)_config_cmds export OPENSSL_LIBS=${$(package)_openssl_flags_$(host_os)} \ export PKG_CONFIG_SYSROOT_DIR=/ && \ @@ -222,7 +201,6 @@ define $(package)_config_cmds export QT_MAC_SDK_NO_VERSION_CHECK=1 && \ env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH -u OBJC_INCLUDE_PATH -u OBJCPLUS_INCLUDE_PATH -u CPATH -u LIBRARY_PATH cmake $($(package)_config_opts) endef -endif define $(package)_build_cmds export LD_LIBRARY_PATH="${build_prefix}/lib/:$(QT_LIBS_LIBS)" && \ diff --git a/contrib/depends/patches/qt/toolchain.cmake b/contrib/depends/patches/qt/toolchain.cmake index 918d372..e8b0578 100644 --- a/contrib/depends/patches/qt/toolchain.cmake +++ b/contrib/depends/patches/qt/toolchain.cmake @@ -9,6 +9,10 @@ set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY) set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER) +if(CMAKE_SYSTEM_NAME STREQUAL "Windows") + set(CMAKE_FIND_ROOT_PATH @host_prefix@;@wmf_libs@) +endif() + if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") set(TARGET_SYSROOT @host_prefix@/native/SDK) set(CMAKE_SYSROOT ${TARGET_SYSROOT})