Merge pull request #1819 from Tilka/cmake

CMake: simplify some expressions
This commit is contained in:
Markus Wick
2015-01-06 09:27:59 +01:00
13 changed files with 42 additions and 46 deletions

View File

@ -33,9 +33,7 @@ endif(PULSEAUDIO_FOUND)
if(WIN32)
set(SRCS ${SRCS} XAudio2Stream.cpp)
endif(WIN32)
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
elseif(APPLE)
set(SRCS ${SRCS} CoreAudioSoundStream.cpp)
endif()

View File

@ -61,7 +61,7 @@ if(WIN32)
endif(WIN32)
set(LIBS "${CMAKE_THREAD_LIBS_INIT}")
if((NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin") AND (NOT ANDROID))
if(NOT APPLE AND NOT ANDROID)
set(LIBS ${LIBS} rt)
endif()

View File

@ -256,13 +256,13 @@ set(LIBS ${LIBS} ${POLARSSL_LIBRARY})
if(WIN32)
set(SRCS ${SRCS} HW/BBA-TAP/TAP_Win32.cpp HW/WiimoteReal/IOWin.cpp)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
elseif(APPLE)
set(SRCS ${SRCS} HW/BBA-TAP/TAP_Apple.cpp HW/WiimoteReal/IOdarwin.mm)
set(LIBS ${LIBS}
${IOB_LIBRARY})
elseif(UNIX)
set(SRCS ${SRCS} HW/BBA-TAP/TAP_Unix.cpp)
if((${CMAKE_SYSTEM_NAME} MATCHES "Linux") AND BLUEZ_FOUND)
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux" AND BLUEZ_FOUND)
set(SRCS ${SRCS} HW/WiimoteReal/IONix.cpp)
set(LIBS ${LIBS} bluetooth)
else()

View File

@ -31,7 +31,7 @@ set(UIS
list(APPEND LIBS core uicommon)
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
if(APPLE)
set(DOLPHINQT_BINARY DolphinQt)
else()
set(DOLPHINQT_BINARY dolphin-emu-qt)
@ -42,7 +42,7 @@ add_executable(${DOLPHINQT_BINARY} ${SRCS} ${UI_HEADERS})
target_link_libraries(${DOLPHINQT_BINARY} ${LIBS})
qt5_use_modules(${DOLPHINQT_BINARY} Widgets)
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
if(APPLE)
# Note: This is based on the DolphinWX version.
include(BundleUtilities)

View File

@ -66,7 +66,7 @@ endif()
set(ANDROID_SRCS Android/ButtonManager.cpp
MainAndroid.cpp)
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
if(APPLE)
if(wxWidgets_FOUND)
list(APPEND WXLIBS
${APPSERV_LIBRARY}
@ -80,7 +80,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
MACOSX_PACKAGE_LOCATION Resources)
endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
if(APPLE)
set(DOLPHIN_EXE_BASE Dolphin)
else()
set(DOLPHIN_EXE_BASE dolphin-emu)
@ -123,7 +123,7 @@ if(ANDROID)
elseif(wxWidgets_FOUND)
add_executable(${DOLPHIN_EXE} ${SRCS} ${GUI_SRCS})
target_link_libraries(${DOLPHIN_EXE} ${LIBS} ${WXLIBS})
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
if(APPLE)
include(BundleUtilities)
set(BUNDLE_PATH ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${DOLPHIN_EXE}.app)

View File

@ -14,10 +14,10 @@ if(WIN32)
ControllerInterface/DInput/DInputKeyboardMouse.cpp
ControllerInterface/XInput/XInput.cpp
ControllerInterface/ForceFeedback/ForceFeedbackDevice.cpp)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
FIND_LIBRARY(COREFOUNDATION_LIBRARY CoreFoundation)
FIND_LIBRARY(CARBON_LIBRARY Carbon)
FIND_LIBRARY(COCOA_LIBRARY Cocoa)
elseif(APPLE)
find_library(COREFOUNDATION_LIBRARY CoreFoundation)
find_library(CARBON_LIBRARY Carbon)
find_library(COCOA_LIBRARY Cocoa)
set(SRCS ${SRCS}
ControllerInterface/OSX/OSX.mm
ControllerInterface/OSX/OSXKeyboard.mm

View File

@ -26,7 +26,7 @@ endif()
if(WIN32)
set(SRCS ${SRCS} GLInterface/WGL.cpp)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
elseif(APPLE)
set(SRCS ${SRCS} GLInterface/AGL.cpp)
elseif(USE_X11)
if (NOT USE_EGL)
@ -51,8 +51,7 @@ if(USE_EGL)
set(LIBS ${LIBS} EGL)
endif()
if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR
${CMAKE_SYSTEM_NAME} MATCHES "NetBSD")
if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD|NetBSD")
set(LIBS ${LIBS} usbhid)
endif()

View File

@ -59,7 +59,7 @@ endif()
add_dolphin_library(videocommon "${SRCS}" "${LIBS}")
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
if(LIBAV_FOUND)
target_link_libraries(videocommon ${LIBS} ${LIBAV_LIBRARIES})
endif()