From 0047ed1ad07ff290724e6e8736db6852f4ed2822 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gonzalo=20Garramu=C3=B1o?= Date: Sat, 17 Feb 2024 09:20:51 -0300 Subject: [PATCH] Added CFLAGS, CXXFLAGS and LDFLAGS to dav1d build. --- etc/SuperBuild/cmake/Modules/Builddav1d.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/etc/SuperBuild/cmake/Modules/Builddav1d.cmake b/etc/SuperBuild/cmake/Modules/Builddav1d.cmake index 4cd43f61..6b49336a 100644 --- a/etc/SuperBuild/cmake/Modules/Builddav1d.cmake +++ b/etc/SuperBuild/cmake/Modules/Builddav1d.cmake @@ -3,7 +3,13 @@ include(ExternalProject) set(dav1d_GIT_TAG 1.3.0) -set(dav1d_CONFIGURE ${CMAKE_COMMAND} -E env PYTHONPATH="" "CXXFLAGS=${CMAKE_CXX_FLAGS}" "CFLAGS=${CMAKE_C_FLAGS}" "LDFLAGS=${CMAKE_SHARED_LINKER_FLAGS}" -- meson setup -Denable_tools=false -Denable_tests=false --default-library=static -Dlibdir=${CMAKE_INSTALL_PREFIX}/lib --prefix=${CMAKE_INSTALL_PREFIX} build) +if(APPLE AND CMAKE_OSX_DEPLOYMENT_TARGET) + set(dav1d_CFLAGS -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}) + set(dav1d_CXXFLAGS -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}) + set(dav1d_LDFLAGS -mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}) +endif() + +set(dav1d_CONFIGURE ${CMAKE_COMMAND} -E env PYTHONPATH="" "CXXFLAGS=${dav1d_CXXFLAGS}" "CFLAGS=${dav1d_CFLAGS}" "LDFLAGS=${dav1d_LDFLAGS}" -- meson setup -Denable_tools=false -Denable_tests=false --default-library=static -Dlibdir=${CMAKE_INSTALL_PREFIX}/lib --prefix=${CMAKE_INSTALL_PREFIX} build) set(dav1d_BUILD export PYTHONPATH="" && cd build && ninja) set(dav1d_INSTALL export PYTHONPATH="" && cd build && ninja install)