mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 09:09:52 -06:00
Make the cmake check_lib macro more versatile. It first tries pkg-config, and if that fails it then check for libraries and required headers. Also cleaned up the output a little bit.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6544 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -39,14 +39,14 @@ set(SRCS Src/BPMemory.cpp
|
||||
Src/XFStructs.cpp
|
||||
Src/OpenCL/OCLTextureDecoder.cpp)
|
||||
|
||||
if(ENCODE_FRAMEDUMPS OR WIN32)
|
||||
if(LIBAV_FOUND OR WIN32)
|
||||
set(SRCS ${SRCS} Src/AVIDump.cpp)
|
||||
endif()
|
||||
|
||||
add_library(videocommon STATIC ${SRCS})
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
if(ENCODE_FRAMEDUMPS)
|
||||
target_link_libraries(videocommon avcodec avformat swscale avutil)
|
||||
if(LIBAV_FOUND)
|
||||
target_link_libraries(videocommon ${LIBAV_LIBRARIES})
|
||||
add_definitions(-D__STDC_CONSTANT_MACROS)
|
||||
endif()
|
||||
add_definitions(-fPIC)
|
||||
|
@ -63,7 +63,7 @@
|
||||
#ifdef _WIN32
|
||||
#include "OS/Win32.h"
|
||||
#endif
|
||||
#if defined _WIN32 || defined HAVE_AVCODEC
|
||||
#if defined _WIN32 || defined HAVE_LIBAV
|
||||
#include "AVIDump.h"
|
||||
#endif
|
||||
|
||||
@ -83,7 +83,7 @@ CGprofile g_cgfProf;
|
||||
|
||||
RasterFont* s_pfont = NULL;
|
||||
|
||||
#if defined _WIN32 || defined HAVE_AVCODEC
|
||||
#if defined _WIN32 || defined HAVE_LIBAV
|
||||
static bool s_bAVIDumping = false;
|
||||
#else
|
||||
static FILE* f_pFrameDump;
|
||||
@ -492,7 +492,7 @@ Renderer::~Renderer()
|
||||
|
||||
delete g_framebuffer_manager;
|
||||
|
||||
#if defined _WIN32 || defined HAVE_AVCODEC
|
||||
#if defined _WIN32 || defined HAVE_LIBAV
|
||||
if(s_bAVIDumping)
|
||||
AVIDump::Stop();
|
||||
#else
|
||||
@ -1102,7 +1102,7 @@ void Renderer::Swap(u32 xfbAddr, FieldType field, u32 fbWidth, u32 fbHeight,cons
|
||||
}
|
||||
|
||||
// Frame dumps are handled a little differently in Windows
|
||||
#if defined _WIN32 || defined HAVE_AVCODEC
|
||||
#if defined _WIN32 || defined HAVE_LIBAV
|
||||
if (g_ActiveConfig.bDumpFrames)
|
||||
{
|
||||
s_criticalScreenshot.Enter();
|
||||
|
Reference in New Issue
Block a user