diff --git a/CMakeLists.txt b/CMakeLists.txt index be0c8bbbc8..917008c013 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -125,7 +125,7 @@ if(BLUEZ_FOUND) message("bluez found, enabling bluetooth support") else() add_definitions(-DHAVE_BLUEZ=0) - message("bluez NOT found, enabling bluetooth support") + message("bluez NOT found, disabling bluetooth support") endif(BLUEZ_FOUND) include_directories(${OPENGL_INCLUDE_DIR}) @@ -185,13 +185,14 @@ else() message("Xrandr NOT found") endif(XRANDR_FOUND) -find_library(PORTAUDIO portaudio) +include(CheckCXXSourceRuns) +set(CMAKE_REQUIRED_LIBRARIES portaudio) +CHECK_CXX_SOURCE_RUNS( + "#include + int main(int argc, char **argv) + { if(Pa_GetVersion() >= 1890) return 0; else return 1; }" + PORTAUDIO) if(PORTAUDIO) - include(CheckFunctionExists) - set(CMAKE_REQUIRED_LIBRARIES portaudio) - CHECK_FUNCTION_EXISTS(Pa_GetVersion PORTAUDIO_VERSION_CHECK) -endif(PORTAUDIO) -if(PORTAUDIO AND PORTAUDIO_VERSION_CHECK) message("PortAudio found, enabling mic support") add_definitions(-DHAVE_PORTAUDIO=1) set(PORTAUDIO_FOUND TRUE) @@ -199,7 +200,7 @@ else() message("PortAudio not found, disabling mic support") add_definitions(-DHAVE_PORTAUDIO=0) set(PORTAUDIO_FOUND FALSE) -endif(PORTAUDIO AND PORTAUDIO_VERSION_CHECK) +endif(PORTAUDIO) find_library(OPENCL OpenCL) find_path(OPENCL_INCLUDE CL/cl.h) diff --git a/Externals/WiiUse/CMakeLists.txt b/Externals/WiiUse/CMakeLists.txt index e750d16fe5..78904e3a65 100644 --- a/Externals/WiiUse/CMakeLists.txt +++ b/Externals/WiiUse/CMakeLists.txt @@ -3,11 +3,13 @@ set(SRCS Src/ir.c if(APPLE) set(SRCS ${SRCS} Src/io_osx.m) -elseif(UNIX) +elseif(UNIX AND BLUEZ_FOUND) set(SRCS ${SRCS} Src/io_nix.c) set(LIBS ${LIBS} bluetooth) elseif(WIN32) set(SRCS ${SRCS} Src/io_win.c) +else() + set(SRCS ${SRCS} Src/io_dummy.c) endif() add_library(wiiuse STATIC ${SRCS}) diff --git a/Source/Plugins/Plugin_VideoOGL/CMakeLists.txt b/Source/Plugins/Plugin_VideoOGL/CMakeLists.txt index 58f974952e..7a17836d50 100644 --- a/Source/Plugins/Plugin_VideoOGL/CMakeLists.txt +++ b/Source/Plugins/Plugin_VideoOGL/CMakeLists.txt @@ -27,9 +27,9 @@ if(wxWidgets_FOUND) endif(wxWidgets_FOUND) if(APPLE AND NOT wxWidgets_FOUND) - set(SRCS ${SRCS} cocoaGL.m) + set(SRCS ${SRCS} Src/cocoaGL.m) elseif(WIN32) - set(SRCS ${SRCS} OS/Win32.cpp) + set(SRCS ${SRCS} Src/OS/Win32.cpp) elseif(NOT APPLE AND OPENCL_FOUND) set(LIBS ${LIBS} OpenCL) endif()