[deps_build/macOS] Fix FFMPEG & VPX configure command
authorArto Kitula <arto.kitula@gmail.com>
Tue, 15 Aug 2017 09:26:33 +0000 (12:26 +0300)
committerArto Kitula <arto.kitula@gmail.com>
Tue, 15 Aug 2017 09:26:33 +0000 (12:26 +0300)
FFMPEG & VPX don't handle target with --build parameter, so we need to make sure use of plain configure command

Reviewed by: Brecht Van Lommel
Differential Revision: http://developer.blender.org/D2791

build_files/build_environment/cmake/ffmpeg.cmake
build_files/build_environment/cmake/options.cmake
build_files/build_environment/cmake/vpx.cmake

index 3f9091b5ee313cfda07299bbef6389f2e8efdca7..2a45849acf51c6dd2920db697db4abde2fcf103c 100644 (file)
@@ -39,6 +39,13 @@ else()
                --enable-libopenjpeg)
 endif()
 
+if(APPLE)
+       set(FFMPEG_EXTRA_FLAGS
+               ${FFMPEG_EXTRA_FLAGS}
+               --target-os=darwin
+               )
+endif()
+
 ExternalProject_Add(external_ffmpeg
        URL ${FFMPEG_URI}
        DOWNLOAD_DIR ${DOWNLOAD_DIR}
@@ -46,7 +53,7 @@ ExternalProject_Add(external_ffmpeg
        PREFIX ${BUILD_DIR}/ffmpeg
        CONFIGURE_COMMAND ${CONFIGURE_ENV_NO_PERL} &&
                cd ${BUILD_DIR}/ffmpeg/src/external_ffmpeg/ &&
-               ${FFMPEG_ENV} ${CONFIGURE_COMMAND} ${FFMPEG_EXTRA_FLAGS}
+               ${FFMPEG_ENV} ${CONFIGURE_COMMAND_NO_TARGET} ${FFMPEG_EXTRA_FLAGS}
                --disable-lzma
                --disable-avfilter
                --disable-vdpau
index 5618fc1255dcee998c9ed4f8ce3a0893acd6a349..465ca3c034c7a6bc429ab874a514da1ad77acc6d 100644 (file)
@@ -108,6 +108,7 @@ if(WIN32)
        )
 
        set(CONFIGURE_COMMAND sh ./configure)
+       set(CONFIGURE_COMMAND_NO_TARGET ${CONFIGURE_COMMAND})
 else()
        set(PATCH_CMD patch)
        set(LIBEXT ".a")
@@ -163,6 +164,7 @@ else()
        )
        set(CONFIGURE_ENV_NO_PERL ${CONFIGURE_ENV})
        set(CONFIGURE_COMMAND ./configure ${PLATFORM_BUILD_TARGET})
+       set(CONFIGURE_COMMAND_NO_TARGET ./configure)
 endif()
 
 set(DEFAULT_CMAKE_FLAGS
index 6569708cb5fb686feda1e25df48fb70f097a0b99..9d155be1c6cd10404ad2dea0c01bba021baf307a 100644 (file)
@@ -23,7 +23,11 @@ if(WIN32)
                set(VPX_EXTRA_FLAGS --target=x86-win32-gcc)
        endif()
 else()
-       set(VPX_EXTRA_FLAGS --target=generic-gnu)
+       if(APPLE)
+               set(VPX_EXTRA_FLAGS --target=x86_64-darwin13-gcc)
+       else()
+               set(VPX_EXTRA_FLAGS --target=generic-gnu)
+       endif()
 endif()
 
 ExternalProject_Add(external_vpx
@@ -33,7 +37,7 @@ ExternalProject_Add(external_vpx
        PREFIX ${BUILD_DIR}/vpx
        CONFIGURE_COMMAND ${CONFIGURE_ENV} &&
                cd ${BUILD_DIR}/vpx/src/external_vpx/ &&
-               ${CONFIGURE_COMMAND} --prefix=${LIBDIR}/vpx
+               ${CONFIGURE_COMMAND_NO_TARGET} --prefix=${LIBDIR}/vpx
                        --disable-shared
                        --enable-static
                        --disable-install-bins