Commit abf6ab0f authored by Dmitry Kazakov's avatar Dmitry Kazakov

Remove avTranscoder and FFmpeg from the deps

parent 70552d50
......@@ -114,4 +114,3 @@ add_subdirectory( ext_frameworks )
if (MSVC)
add_subdirectory( google-breakpad )
endif()
add_subdirectory( ext_avtranscoder )
......@@ -211,7 +211,6 @@ On All operating systems:
cmake --build . --config RelWithDebInfo --target ext_vc
cmake --build . --config RelWithDebInfo --target ext_libraw
cmake --build . --config RelWithDebInfo --target ext_openjpeg
cmake --build . --config RelWithDebInfo --target ext_avtranscoder
On Windows and OSX
......
SET(EXTPREFIX_avtranscoder "${EXTPREFIX}" )
ExternalProject_Add( ext_avtranscoder
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://files.kde.org/krita/build/dependencies/avTranscoder-0.9.5_krita_1.zip
URL_MD5 d63eaca4eb696f0e0876a5238cbae46d
INSTALL_DIR ${EXTPREFIX_avtranscoder}
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=${EXTPREFIX_avtranscoder} -DCMAKE_BUILD_TYPE=${GLOBAL_BUILD_TYPE} ${GLOBAL_PROFILE} -DAVTRANSCODER_DISABLE_APPS=TRUE -DAVTRANSCODER_DISABLE_BINDINGS=TRUE
UPDATE_COMMAND ""
ALWAYS 0
)
SET(PREFIX_ext_ffmpeg "${EXTPREFIX}" )
ExternalProject_Add( ext_ffmpeg
DOWNLOAD_DIR ${EXTERNALS_DOWNLOAD_DIR}
URL http://files.kde.org/krita/build/dependencies/ffmpeg-2.8.7.tar.xz
URL_MD5 7e5b1c98eedfc3a364fa8c4095deeae5
CONFIGURE_COMMAND <SOURCE_DIR>/configure --prefix=${PREFIX_ext_ffmpeg} ${GLOBAL_AUTOMAKE_PROFILE} -disable-debug \
--enable-memalign-hack \
--disable-pthreads \
--enable-w32threads \
--disable-doc \
--enable-avresample \
--enable-gpl \
--disable-programs
BUILD_COMMAND make
INSTALL_COMMAND make install
UPDATE_COMMAND ""
ALWAYS 0
)
# AvTranscoder_FOUND
# AvTranscoder_INCLUDE_DIR
# AvTranscoder_LIBRARIES
# AvTranscoder_DEFINITIONS
# AvTranscoder_VERSION_MAJOR
# AvTranscoder_VERSION_MINOR
# AvTranscoder_VERSION_PATCH
# AvTranscoder_VERSION
# AvTranscoder_VERSION_STRING
# AvTranscoder_INSTALL_DIR
# AvTranscoder_LIB_DIR
# AvTranscoder_CMAKE_MODULES_DIR
find_package(AvTranscoder ${AvTranscoder_FIND_VERSION} QUIET NO_MODULE PATHS $ENV{HOME} /opt/AvTranscoder)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(AvTranscoder CONFIG_MODE REQUIRED_VARS AvTranscoder_LIBRARIES)
# - Find FFmpeg library
# Find the native FFmpeg includes and library.
#
# This module defines:
# FFMPEG_FOUND
# FFMPEG_INCLUDE_DIR - The FFmpeg include directory.
# FFMPEG_LIBRARIES - The FFmpeg libraries.
# FFMPEG_DEFINITIONS - The FFmpeg compile flags.
#
# For each component:
# ${COMPONENT}_FOUND
# ${COMPONENT}_INCLUDE_DIR
# ${COMPONENT}_LIBRARIES
# ${COMPONENT}_DEFINITIONS
# ${COMPONENT}_VERSION
#
# If any component is specified, default components are avcodec avformat avutil.
#
### Macro: check_ffmpeg_version
#
# Check FFmpeg version.
# @todo: clean how to get current FFmpeg version.
#
macro(check_ffmpeg_version)
exec_program("ffmpeg -version 2>&1 | grep 'ffmpeg version' | sed -e 's/ffmpeg\ version\ //'"
OUTPUT_VARIABLE FFmpeg_CURRENT_VERSION)
if(${FFmpeg_CURRENT_VERSION} LESS ${FFmpeg_FIND_VERSION})
message(SEND_ERROR "Your FFmpeg version is too old (${FFmpeg_CURRENT_VERSION} < ${FFmpeg_FIND_VERSION}).")
endif()
endmacro()
### Macro: find_component
#
# Check the given component by invoking pkgconfig and
# then looking up the libraries and include directories.
#
macro(find_component COMPONENT PKGCONFIG LIBRARY HEADER)
if(NOT WIN32)
# use pkg-config to get the directories
find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
pkg_check_modules(PC_${COMPONENT} ${PKGCONFIG})
endif()
# find include
find_path(${COMPONENT}_INCLUDE_DIR
${HEADER}
HINTS ${PC_${COMPONENT}_INCLUDEDIR} ${PC_${COMPONENT}_INCLUDE_DIR}
)
# find lib
find_library(${COMPONENT}_LIBRARIES
NAMES ${LIBRARY}
HINTS ${PC_${COMPONENT}_LIBDIR} ${PC_${COMPONENT}_LIBRARY_DIRS}
)
# set definition and version
set(${COMPONENT}_DEFINITIONS ${PC_${COMPONENT}_CFLAGS_OTHER} CACHE STRING "The ${COMPONENT} CFLAGS.")
set(${COMPONENT}_VERSION ${PC_${COMPONENT}_VERSION} CACHE STRING "The ${COMPONENT} version number.")
else()
# find include
find_path(${COMPONENT}_INCLUDE_DIR ${HEADER})
# find lib
file(GLOB_RECURSE ${COMPONENT}_LIBRARIES "${CMAKE_PREFIX_PATH}/*${COMPONENT}.lib")
# @todo: define definition and version
endif()
# Marks the given component as found if both *_LIBRARIES AND *_INCLUDE_DIR is present.
if(${COMPONENT}_LIBRARIES AND ${COMPONENT}_INCLUDE_DIR)
set(${COMPONENT}_FOUND TRUE)
else()
set(${COMPONENT}_FOUND FALSE)
endif()
mark_as_advanced(
${COMPONENT}_FOUND
${COMPONENT}_INCLUDE_DIR
${COMPONENT}_LIBRARIES
${COMPONENT}_DEFINITIONS
${COMPONENT}_VERSION
)
endmacro()
### Macro: manage_components
# Define CMake variables for each component defined in FFmpeg_FIND_COMPONENTS
# Send error if a required component is missing (warning if not required)
# Set if FFMPEG is found
#
macro(manage_components)
# Check components and add their stuff to the FFMPEG_* vars.
foreach(COMPONENT ${FFmpeg_FIND_COMPONENTS})
# Get component name is lower cases.
string(TOLOWER ${COMPONENT} LOWERCOMPONENT)
find_component(${COMPONENT} lib${LOWERCOMPONENT} ${LOWERCOMPONENT} lib${LOWERCOMPONENT}/${LOWERCOMPONENT}.h)
# If the component is found.
if(${COMPONENT}_FOUND)
message(STATUS "Component ${COMPONENT} present.")
# Skip components which are in a different location
# This prevents us to depend on libav system libraries if we build with ffmpeg (and the reverse).
if(NOT FFMPEG_INCLUDE_DIR OR FFMPEG_INCLUDE_DIR STREQUAL ${${COMPONENT}_INCLUDE_DIR})
set(FFMPEG_INCLUDE_DIR ${${COMPONENT}_INCLUDE_DIR})
set(FFMPEG_LIBRARIES ${FFMPEG_LIBRARIES} ${${COMPONENT}_LIBRARIES})
set(FFMPEG_DEFINITIONS ${FFMPEG_DEFINITIONS} ${${COMPONENT}_DEFINITIONS})
else()
message(STATUS "Skip ${COMPONENT} component because it was found elsewhere ('${${COMPONENT}_INCLUDE_DIR}' instead of '${FFMPEG_INCLUDE_DIR}').")
set(${COMPONENT}_FOUND FALSE)
endif()
else()
if(FFmpeg_FIND_REQUIRED)
message(SEND_ERROR "Error: required component ${COMPONENT} missing.")
else()
message(STATUS "Warning: component ${COMPONENT} missing.")
endif()
endif()
endforeach()
# Build the include path with duplicates removed.
if(FFMPEG_INCLUDE_DIR)
list(REMOVE_DUPLICATES FFMPEG_INCLUDE_DIR)
set(FFMPEG_FOUND TRUE)
endif()
endmacro()
# Check FFmpeg version
if(DEFINED FFmpeg_FIND_VERSION)
check_ffmpeg_version()
endif()
# Get basic components if no one is indicated
if(NOT FFmpeg_FIND_COMPONENTS)
set(FFmpeg_FIND_COMPONENTS avcodec avformat avutil)
endif()
# Check each component
manage_components()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment