fix: build expat position-independent too

expat is built with CMake, which does not force -fPIC for a static
library; like alsa-lib it is linked into the shared libmpv.so and
fails with the same relocation error. Enable CMAKE_POSITION_INDEPENDENT_CODE.
(The meson-built dependencies already default to -fPIC for static libs.)
This commit is contained in:
david
2026-10-01 19:49:02 +02:00
parent 1beeae9d0e
commit ccf3f3913c
+1
View File
@@ -121,6 +121,7 @@ _expat () {
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX="$prefix_dir" \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_POSITION_INDEPENDENT_CODE=ON \
-DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF -DBUILD_TOOLS=OFF
cmake --build build -j$(nproc)
cmake --install build