From 4f81997c14a5bc48f8412e4bdcd086127c765159 Mon Sep 17 00:00:00 2001 From: Glenn Rice Date: Tue, 16 Nov 2010 04:34:52 +0000 Subject: [PATCH] Fix the no gui cmake build. Add a version check for avcodec and swscale libraries. Fix a bug in the xlib wiimote emulation button configuration. If you are using a mouse button for wiimote emulation you may need to adjust your settings. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6426 8ced0084-cf51-0410-be5f-012b33b47a6e --- CMakeLists.txt | 9 ++++++--- .../InputCommon/Src/ControllerInterface/Xlib/Xlib.cpp | 2 +- Source/Core/VideoCommon/CMakeLists.txt | 4 ++-- Source/Plugins/Plugin_VideoOGL/CMakeLists.txt | 2 +- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f5c3612ea9..56d8f37a60 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -171,11 +171,14 @@ else() message("Xrandr NOT found") endif(XRANDR_FOUND) -pkg_search_module(AVCODEC "libavcodec libswscale") -if(AVCODEC_FOUND) +pkg_search_module(AVCODEC libavcodec>=52.72.2) +pkg_search_module(SWSCALE libswscale>=0.11.0) +if(AVCODEC_FOUND AND SWSCALE_FOUND) message("avcodec found, enabling MPG frame dumps") + set(ENCODE_FRAMEDUMPS TRUE) add_definitions(-DHAVE_AVCODEC) else() + set(ENCODE_FRAMEDUMPS FALSE) message("avcodec not found, disabling MPG frame dumps") endif() @@ -306,7 +309,7 @@ if(NOT APPLE) add_definitions(-DUSE_CLRUN) endif(NOT APPLE) -set(DISABLE_WX FALSE CACHE BOOL "Disable wxWidgets (use CLI interface)") +option(DISABLE_WX OFF "Disable wxWidgets (use CLI interface)") if(NOT DISABLE_WX) include(FindwxWidgets OPTIONAL) diff --git a/Source/Core/InputCommon/Src/ControllerInterface/Xlib/Xlib.cpp b/Source/Core/InputCommon/Src/ControllerInterface/Xlib/Xlib.cpp index f9e05fbbab..c83eb892c0 100644 --- a/Source/Core/InputCommon/Src/ControllerInterface/Xlib/Xlib.cpp +++ b/Source/Core/InputCommon/Src/ControllerInterface/Xlib/Xlib.cpp @@ -163,7 +163,7 @@ std::string KeyboardMouse::Button::GetName() const } static char tmpstr[] = "Click ."; - tmpstr[7] = button; + tmpstr[6] = button; return tmpstr; } diff --git a/Source/Core/VideoCommon/CMakeLists.txt b/Source/Core/VideoCommon/CMakeLists.txt index 986ffe84af..ae3db64119 100644 --- a/Source/Core/VideoCommon/CMakeLists.txt +++ b/Source/Core/VideoCommon/CMakeLists.txt @@ -35,13 +35,13 @@ set(SRCS Src/BPMemory.cpp Src/XFStructs.cpp Src/OpenCL/OCLTextureDecoder.cpp) -if(AVCODEC_FOUND OR WIN32) +if(ENCODE_FRAMEDUMPS OR WIN32) set(SRCS ${SRCS} Src/AVIDump.cpp) endif() add_library(videocommon STATIC ${SRCS}) if(UNIX) - if(AVCODEC_FOUND) + if(ENCODE_FRAMEDUMPS) target_link_libraries(videocommon avcodec swscale) add_definitions(-D__STDC_CONSTANT_MACROS) endif() diff --git a/Source/Plugins/Plugin_VideoOGL/CMakeLists.txt b/Source/Plugins/Plugin_VideoOGL/CMakeLists.txt index 308eac4469..0452b0f1b1 100644 --- a/Source/Plugins/Plugin_VideoOGL/CMakeLists.txt +++ b/Source/Plugins/Plugin_VideoOGL/CMakeLists.txt @@ -13,7 +13,6 @@ set(SRCS Src/BPFunctions.cpp Src/VertexManager.cpp) set(LIBS videocommon - videouicommon GLEW SOIL common @@ -23,6 +22,7 @@ set(LIBS videocommon if(wxWidgets_FOUND) set(SRCS ${SRCS} Src/Debugger/Debugger.cpp) + set(LIBS videouicommon ${LIBS}) endif(wxWidgets_FOUND) if(APPLE AND NOT wxWidgets_FOUND)