mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-05 22:41:25 +12:00
get ffmpeg working with cmake..
This commit is contained in:
parent
7a1d44b552
commit
bea8be29d5
3 changed files with 85 additions and 3 deletions
|
@ -10,6 +10,7 @@ if (CMAKE_COMPILER_IS_GNUCXX)
|
||||||
add_definitions(-fpermissive) # TODO: remove me
|
add_definitions(-fpermissive) # TODO: remove me
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules)
|
||||||
SET(EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/../bin")
|
SET(EXECUTABLE_OUTPUT_PATH "${CMAKE_SOURCE_DIR}/../bin")
|
||||||
|
|
||||||
add_definitions(-DGL_GLEXT_PROTOTYPES)
|
add_definitions(-DGL_GLEXT_PROTOTYPES)
|
||||||
|
@ -17,12 +18,14 @@ add_definitions(-DGLX_GLXEXT_PROTOTYPES)
|
||||||
|
|
||||||
find_package(wxWidgets COMPONENTS core base net aui gl REQUIRED)
|
find_package(wxWidgets COMPONENTS core base net aui gl REQUIRED)
|
||||||
find_package(OpenGL REQUIRED)
|
find_package(OpenGL REQUIRED)
|
||||||
|
find_package(FFMPEG REQUIRED)
|
||||||
find_package(ZLIB REQUIRED)
|
find_package(ZLIB REQUIRED)
|
||||||
|
|
||||||
include("${wxWidgets_USE_FILE}")
|
include("${wxWidgets_USE_FILE}")
|
||||||
|
|
||||||
include_directories(
|
include_directories(
|
||||||
${wxWidgets_INCLUDE_DIRS}
|
${wxWidgets_INCLUDE_DIRS}
|
||||||
|
${FFMPEG_INCLUDE_DIR}
|
||||||
${CMAKE_SOURCE_DIR}
|
${CMAKE_SOURCE_DIR}
|
||||||
${CMAKE_SOURCE_DIR}/Emu
|
${CMAKE_SOURCE_DIR}/Emu
|
||||||
${CMAKE_SOURCE_DIR}/Gui
|
${CMAKE_SOURCE_DIR}/Gui
|
||||||
|
|
|
@ -5,9 +5,9 @@
|
||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
#include "libavcodec\avcodec.h"
|
#include "libavcodec/avcodec.h"
|
||||||
#include "libavformat\avformat.h"
|
#include "libavformat/avformat.h"
|
||||||
#include "libavutil\imgutils.h"
|
#include "libavutil/imgutils.h"
|
||||||
}
|
}
|
||||||
|
|
||||||
#include "cellVdec.h"
|
#include "cellVdec.h"
|
||||||
|
|
79
rpcs3/cmake_modules/FindFFMPEG.cmake
Normal file
79
rpcs3/cmake_modules/FindFFMPEG.cmake
Normal file
|
@ -0,0 +1,79 @@
|
||||||
|
# - Try to find ffmpeg libraries (libavcodec, libavformat and libavutil)
|
||||||
|
# Once done this will define
|
||||||
|
#
|
||||||
|
# FFMPEG_FOUND - system has ffmpeg or libav
|
||||||
|
# FFMPEG_INCLUDE_DIR - the ffmpeg include directory
|
||||||
|
# FFMPEG_LIBRARIES - Link these to use ffmpeg
|
||||||
|
# FFMPEG_LIBAVCODEC
|
||||||
|
# FFMPEG_LIBAVFORMAT
|
||||||
|
# FFMPEG_LIBAVUTIL
|
||||||
|
#
|
||||||
|
# Copyright (c) 2008 Andreas Schneider <mail@cynapses.org>
|
||||||
|
# Modified for other libraries by Lasse Kärkkäinen <tronic>
|
||||||
|
# Modified for Hedgewars by Stepik777
|
||||||
|
#
|
||||||
|
# Redistribution and use is allowed according to the terms of the New
|
||||||
|
# BSD license.
|
||||||
|
#
|
||||||
|
|
||||||
|
if (FFMPEG_LIBRARIES AND FFMPEG_INCLUDE_DIR)
|
||||||
|
# in cache already
|
||||||
|
set(FFMPEG_FOUND TRUE)
|
||||||
|
else (FFMPEG_LIBRARIES AND FFMPEG_INCLUDE_DIR)
|
||||||
|
# use pkg-config to get the directories and then use these values
|
||||||
|
# in the FIND_PATH() and FIND_LIBRARY() calls
|
||||||
|
find_package(PkgConfig)
|
||||||
|
if (PKG_CONFIG_FOUND)
|
||||||
|
pkg_check_modules(_FFMPEG_AVCODEC libavcodec)
|
||||||
|
pkg_check_modules(_FFMPEG_AVFORMAT libavformat)
|
||||||
|
pkg_check_modules(_FFMPEG_AVUTIL libavutil)
|
||||||
|
endif (PKG_CONFIG_FOUND)
|
||||||
|
|
||||||
|
find_path(FFMPEG_AVCODEC_INCLUDE_DIR
|
||||||
|
NAMES libavcodec/avcodec.h
|
||||||
|
PATHS ${_FFMPEG_AVCODEC_INCLUDE_DIRS} /usr/include /usr/local/include /opt/local/include /sw/include
|
||||||
|
PATH_SUFFIXES ffmpeg libav
|
||||||
|
)
|
||||||
|
|
||||||
|
find_library(FFMPEG_LIBAVCODEC
|
||||||
|
NAMES avcodec
|
||||||
|
PATHS ${_FFMPEG_AVCODEC_LIBRARY_DIRS} /usr/lib /usr/local/lib /opt/local/lib /sw/lib
|
||||||
|
)
|
||||||
|
|
||||||
|
find_library(FFMPEG_LIBAVFORMAT
|
||||||
|
NAMES avformat
|
||||||
|
PATHS ${_FFMPEG_AVFORMAT_LIBRARY_DIRS} /usr/lib /usr/local/lib /opt/local/lib /sw/lib
|
||||||
|
)
|
||||||
|
|
||||||
|
find_library(FFMPEG_LIBAVUTIL
|
||||||
|
NAMES avutil
|
||||||
|
PATHS ${_FFMPEG_AVUTIL_LIBRARY_DIRS} /usr/lib /usr/local/lib /opt/local/lib /sw/lib
|
||||||
|
)
|
||||||
|
|
||||||
|
if (FFMPEG_LIBAVCODEC AND FFMPEG_LIBAVFORMAT)
|
||||||
|
set(FFMPEG_FOUND TRUE)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if (FFMPEG_FOUND)
|
||||||
|
set(FFMPEG_INCLUDE_DIR ${FFMPEG_AVCODEC_INCLUDE_DIR})
|
||||||
|
|
||||||
|
set(FFMPEG_LIBRARIES
|
||||||
|
${FFMPEG_LIBAVCODEC}
|
||||||
|
${FFMPEG_LIBAVFORMAT}
|
||||||
|
${FFMPEG_LIBAVUTIL}
|
||||||
|
)
|
||||||
|
|
||||||
|
endif (FFMPEG_FOUND)
|
||||||
|
|
||||||
|
if (FFMPEG_FOUND)
|
||||||
|
if (NOT FFMPEG_FIND_QUIETLY)
|
||||||
|
message(STATUS "Found FFMPEG or Libav: ${FFMPEG_LIBRARIES}, ${FFMPEG_INCLUDE_DIR}")
|
||||||
|
endif (NOT FFMPEG_FIND_QUIETLY)
|
||||||
|
else (FFMPEG_FOUND)
|
||||||
|
if (FFMPEG_FIND_REQUIRED)
|
||||||
|
message(FATAL_ERROR "Could not find libavcodec or libavformat or libavutil")
|
||||||
|
endif (FFMPEG_FIND_REQUIRED)
|
||||||
|
endif (FFMPEG_FOUND)
|
||||||
|
|
||||||
|
endif (FFMPEG_LIBRARIES AND FFMPEG_INCLUDE_DIR)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue