summaryrefslogtreecommitdiffstats
path: root/ci
diff options
context:
space:
mode:
authorJan Ekström <jeebjp@gmail.com>2022-06-06 21:40:28 +0300
committerJan Ekström <jeebjp@gmail.com>2022-06-07 21:02:22 +0300
commita10e3ab23025de42371ba99995691c2d309147d7 (patch)
tree15725ca3f8378e2d849cbe06746d3e4027695116 /ci
parent7684ebc68b222899254c00fc10c2207d0b3975b1 (diff)
downloadmpv-a10e3ab23025de42371ba99995691c2d309147d7.tar.bz2
mpv-a10e3ab23025de42371ba99995691c2d309147d7.tar.xz
ci/mingw64: make meson crossfile global
This enables it to be utilized for dependencies such as libplacebo.
Diffstat (limited to 'ci')
-rwxr-xr-xci/build-mingw64.sh34
1 files changed, 17 insertions, 17 deletions
diff --git a/ci/build-mingw64.sh b/ci/build-mingw64.sh
index 5e4e93f119..d8382f5edd 100755
--- a/ci/build-mingw64.sh
+++ b/ci/build-mingw64.sh
@@ -22,6 +22,22 @@ export RANLIB=$TARGET-ranlib
export CFLAGS="-O2 -pipe -Wall -D_FORTIFY_SOURCE=2"
export LDFLAGS="-fstack-protector-strong"
+cat > "${prefix_dir}/crossfile" << EOF
+[binaries]
+c = '${CC}'
+cpp = '${CXX}'
+ar = '${AR}'
+strip = '${TARGET}-strip'
+pkgconfig = 'pkg-config'
+exe_wrapper = 'wine64' # A command used to run generated executables.
+windres = '${TARGET}-windres'
+[host_machine]
+system = 'windows'
+cpu_family = '${CPU}'
+cpu = '${CPU}'
+endian = 'little'
+EOF
+
function builddir () {
[ -d "$1/builddir" ] && rm -rf "$1/builddir"
mkdir -p "$1/builddir"
@@ -159,24 +175,8 @@ if [ $1 = "meson" ]; then
CPU="x86_64"
mkdir -p "${TARGET}_mingw_build" && pushd "${TARGET}_mingw_build"
-cat > mingw64_crossfile << EOF
-[binaries]
-c = '${CC}'
-cpp = '${CXX}'
-ar = '${AR}'
-strip = '${TARGET}-strip'
-pkgconfig = 'pkg-config'
-exe_wrapper = 'wine64' # A command used to run generated executables.
-windres = '${TARGET}-windres'
-[host_machine]
-system = 'windows'
-cpu_family = '${CPU}'
-cpu = '${CPU}'
-endian = 'little'
-EOF
-
CFLAGS="-I'$prefix_dir/include'" LDFLAGS="-L'$prefix_dir/lib'" \
- meson .. --cross-file mingw64_crossfile --libdir lib \
+ meson .. --cross-file "${prefix_dir}/crossfile" --libdir lib \
-Dlibmpv=true -Dlua=luajit -D{shaderc,spirv-cross,d3d11}=enabled
meson compile