Important fixes to this branch:

* Don't download the repo again if it exists.
* Remember the include directories.
This commit is contained in:
Jason Felds
2015-03-24 20:04:48 -04:00
parent 6963e4d493
commit 8993ce7fa8
2 changed files with 29 additions and 17 deletions
+27 -14
View File
@@ -299,8 +299,10 @@ elseif(LINUX)
set(HAS_FFMPEG TRUE)
endif()
else()
set(SM_FFMPEG_SRC_DIR "${SM_EXTERN_DIR}/ffmpeg-linux-2.1.3")
set(SM_FFMPEG_ROOT "${CMAKE_BINARY_DIR}/ffmpeg-prefix/src/ffmpeg-build")
list(APPEND FFMPEG_CONFIGURE
"${SM_EXTERN_DIR}/ffmpeg-linux-2.1.3/configure"
"${SM_FFMPEG_SRC_DIR}/configure"
"--disable-programs"
"--disable-doc"
"--disable-avdevice"
@@ -315,19 +317,30 @@ elseif(LINUX)
"--enable-gpl"
)
endif()
# --shlibdir=$our_installdir/stepmania-$VERSION
externalproject_add("ffmpeg"
# DOWNLOAD_DIR "${SM_EXTERN_DIR}/ffmpeg-linux"
# PREFIX "${SM_EXTERN_DIR}/ffmpeg-linux"
# GIT_REPOSITORY "git://source.ffmpeg.org/ffmpeg.git"
# GIT_TAG "n2.1.3"
DOWNLOAD_COMMAND git clone "--branch" "n2.1.3" "--depth" "1" "git://source.ffmpeg.org/ffmpeg.git" "${SM_EXTERN_DIR}/ffmpeg-linux-2.1.3"
CONFIGURE_COMMAND ${FFMPEG_CONFIGURE}
BUILD_COMMAND "make"
UPDATE_COMMAND ""
INSTALL_COMMAND ""
TEST_COMMAND ""
)
if (IS_DIRECTORY "${SM_FFMPEG_SRC_DIR}")
externalproject_add("ffmpeg"
SOURCE_DIR "${SM_FFMPEG_SRC_DIR}"
CONFIGURE_COMMAND ${FFMPEG_CONFIGURE}
BUILD_COMMAND "make"
UPDATE_COMMAND ""
INSTALL_COMMAND ""
TEST_COMMAND ""
)
else()
# --shlibdir=$our_installdir/stepmania-$VERSION
externalproject_add("ffmpeg"
# DOWNLOAD_DIR "${SM_EXTERN_DIR}/ffmpeg-linux"
# PREFIX "${SM_EXTERN_DIR}/ffmpeg-linux"
# GIT_REPOSITORY "git://source.ffmpeg.org/ffmpeg.git"
# GIT_TAG "n2.1.3"
DOWNLOAD_COMMAND git clone "--branch" "n2.1.3" "--depth" "1" "git://source.ffmpeg.org/ffmpeg.git" "${SM_FFMPEG_SRC_DIR}"
CONFIGURE_COMMAND ${FFMPEG_CONFIGURE}
BUILD_COMMAND "make"
UPDATE_COMMAND ""
INSTALL_COMMAND ""
TEST_COMMAND ""
)
endif()
set(HAS_FFMPEG TRUE)
endif()
else()
+2 -3
View File
@@ -392,7 +392,6 @@ else() # Unix / Linux
"${FFMPEG_avutil_LIBRARY}"
)
else()
set(SM_FFMPEG_ROOT "${CMAKE_BINARY_DIR}/ffmpeg-prefix/src/ffmpeg-build")
list(APPEND SMDATA_LINK_LIB
"${SM_FFMPEG_ROOT}/libavformat/libavformat.a"
"${SM_FFMPEG_ROOT}/libavcodec/libavcodec.a"
@@ -496,8 +495,8 @@ if(NOT APPLE)
else()
add_dependencies("${SM_EXE_NAME}" "ffmpeg")
list(APPEND SM_INCLUDE_DIRS
"${SM_EXTERN_DIR}/ffmpeg-linux/src/ffmpeg"
"${SM_EXTERN_DIR}/ffmpeg-linux/src/ffmpeg-build"
"${SM_FFMPEG_SRC_DIR}"
"${SM_FFMPEG_ROOT}"
)
endif()
endif()