Qt: Allow building with system ffmpeg. Also update b.sh to set cmake and qmake flags in case --qt is at the end of the arguments.

This commit is contained in:
Sacha 2014-08-05 16:59:57 +10:00
parent ee9eb00656
commit b7982729b0
2 changed files with 9 additions and 14 deletions

View File

@ -19,13 +19,11 @@ include(Platform/ArchDetection.pri)
# Work out platform name
include(Platform/OSDetection.pri)
# OS dependent paths
INCLUDEPATH += $$P/ffmpeg/$${PLATFORM_NAME}/$${PLATFORM_ARCH}/include
!system_ffmpeg: INCLUDEPATH += $$P/ffmpeg/$${PLATFORM_NAME}/$${PLATFORM_ARCH}/include
!contains(CONFIG, staticlib) {
QMAKE_LIBDIR += $$CONFIG_DIR $$P/ffmpeg/$${PLATFORM_NAME}/$${PLATFORM_ARCH}/lib/
g++: LIBS += -Wl,-Bstatic
!system_ffmpeg: QMAKE_LIBDIR += $$CONFIG_DIR $$P/ffmpeg/$${PLATFORM_NAME}/$${PLATFORM_ARCH}/lib/
contains(DEFINES, USE_FFMPEG): LIBS+= -lavformat -lavcodec -lavutil -lswresample -lswscale
g++: LIBS += -Wl,-Bdynamic
equals(PLATFORM_NAME, "linux"):arm|android: LIBS += -lEGL
}

9
b.sh
View File

@ -37,18 +37,15 @@ do
CMAKE_ARGS="-DSIMULATOR=ON ${CMAKE_ARGS}"
;;
--release)
if [ "$CMAKE" == "1" ]; then
CMAKE_ARGS="-DCMAKE_BUILD_TYPE=Release ${CMAKE_ARGS}"
else
QMAKE_ARGS="CONFIG+=release ${QMAKE_ARGS}"
fi
;;
--debug)
if [ "$CMAKE" == "1" ]; then
CMAKE_ARGS="-DCMAKE_BUILD_TYPE=Debug ${CMAKE_ARGS}"
else
QMAKE_ARGS="CONFIG+=debug ${QMAKE_ARGS}"
fi
;;
--system-ffmpeg)
QMAKE_ARGS="CONFIG+=system_ffmpeg ${QMAKE_ARGS}"
;;
--headless) echo "Headless mode enabled"
CMAKE_ARGS="-DHEADLESS=ON ${CMAKE_ARGS}"