From 87380c1c2cffb488690c6f0a253b225cb78671ea Mon Sep 17 00:00:00 2001 From: Florent Castelli Date: Wed, 25 Jan 2017 06:25:52 +0100 Subject: [PATCH 1/4] cmake: Change endif(.*) to endif() --- CMakeLists.txt | 26 +++++++++++++------------- Source/Core/AudioCommon/CMakeLists.txt | 10 +++++----- Source/Core/Core/CMakeLists.txt | 12 ++++++------ 3 files changed, 24 insertions(+), 24 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d38ca95386..8378097c2d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -319,8 +319,8 @@ if(UNIX) option(LINUX_LOCAL_DEV "Enable relocatable binary" OFF) if(LINUX_LOCAL_DEV) add_definitions(-DLINUX_LOCAL_DEV) - endif(LINUX_LOCAL_DEV) -endif(UNIX) + endif() +endif() # BSDs put packages in /usr/local instead of /usr, so we need to # force CMake to look in those directories by default, too. @@ -339,7 +339,7 @@ find_package(Threads) if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build type (Release/Debug/RelWithDebInfo/MinSizeRel)" FORCE) -endif(NOT CMAKE_BUILD_TYPE) +endif() if(CMAKE_BUILD_TYPE STREQUAL "Debug") @@ -362,7 +362,7 @@ endif() if(GDBSTUB) add_definitions(-DUSE_GDBSTUB) -endif(GDBSTUB) +endif() if(VTUNE) if(EXISTS "$ENV{VTUNE_AMPLIFIER_XE_2015_DIR}") @@ -378,7 +378,7 @@ if(VTUNE) "${VTUNE_DIR}/lib64/libjitprofiling.a" "${VTUNE_DIR}/lib64/libittnotify.a" ) -endif(VTUNE) +endif() if(ANDROID) message(STATUS "Building for Android") @@ -530,7 +530,7 @@ if(UNIX AND NOT APPLE AND NOT ANDROID AND NOT ENABLE_HEADLESS) SET(X11_FOUND "") message(STATUS "X11 support disabled") add_definitions(-DHAVE_X11=0) - endif(TRY_X11 AND X11_FOUND) + endif() if (NOT USE_X11) message(FATAL_ERROR "\n" @@ -545,7 +545,7 @@ if(USE_X11) add_definitions(-DHAVE_XRANDR=1) else() add_definitions(-DHAVE_XRANDR=0) - endif(XRANDR_FOUND) + endif() pkg_check_modules(X11_INPUT REQUIRED xi>=1.5.0) endif() @@ -687,7 +687,7 @@ else(ZLIB_FOUND) message(STATUS "Shared zlib not found, falling back to the static library") add_subdirectory(Externals/zlib) include_directories(Externals/zlib) -endif(ZLIB_FOUND) +endif() if(NOT APPLE) check_lib(LZO "(no .pc for lzo2)" lzo2 lzo/lzo1x.h QUIET) @@ -742,8 +742,8 @@ if(ENABLE_SDL) include_directories(${SDL_INCLUDE_DIR}) else(SDL_FOUND) message(STATUS "SDL NOT found, disabling SDL input") - endif(SDL_FOUND) - endif(SDL2_FOUND) + endif() + endif() endif() if(NOT ANDROID) @@ -906,7 +906,7 @@ if(NOT DISABLE_WX) message(STATUS "At least ${wxMIN_VERSION} is required; ignoring found version") unset(wxWidgets_FOUND) endif() - endif(wxWidgets_FOUND) + endif() if(UNIX AND NOT APPLE) # There is a bug in the FindGTK module in cmake version 2.8.2 that @@ -963,8 +963,8 @@ if(NOT DISABLE_WX) add_subdirectory(Externals/wxWidgets3) set(wxWidgets_FOUND TRUE) set(wxWidgets_LIBRARIES "wx") - endif(wxWidgets_FOUND) -endif(NOT DISABLE_WX) + endif() +endif() if(${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD|NetBSD") set(LIBS ${LIBS} usbhid) diff --git a/Source/Core/AudioCommon/CMakeLists.txt b/Source/Core/AudioCommon/CMakeLists.txt index bceeec8e45..9cc835707b 100644 --- a/Source/Core/AudioCommon/CMakeLists.txt +++ b/Source/Core/AudioCommon/CMakeLists.txt @@ -9,27 +9,27 @@ set(LIBS "") if(OPENSLES_FOUND) set(SRCS ${SRCS} OpenSLESStream.cpp) set(LIBS ${LIBS} ${OPENSLES_LIBRARIES}) -endif(OPENSLES_FOUND) +endif() if(ALSA_FOUND) set(SRCS ${SRCS} AlsaSoundStream.cpp) set(LIBS ${LIBS} ${ALSA_LIBRARIES}) -endif(ALSA_FOUND) +endif() if(AO_FOUND) set(SRCS ${SRCS} AOSoundStream.cpp) set(LIBS ${LIBS} ${AO_LIBRARIES}) -endif(AO_FOUND) +endif() if(OPENAL_FOUND) set(SRCS ${SRCS} OpenALStream.cpp aldlist.cpp) set(LIBS ${LIBS} ${OPENAL_LIBRARY} SoundTouch ) -endif(OPENAL_FOUND) +endif() if(PULSEAUDIO_FOUND) set(SRCS ${SRCS} PulseAudioStream.cpp) set(LIBS ${LIBS} ${PULSEAUDIO_LIBRARIES}) -endif(PULSEAUDIO_FOUND) +endif() if(WIN32) set(SRCS ${SRCS} XAudio2Stream.cpp) diff --git a/Source/Core/Core/CMakeLists.txt b/Source/Core/Core/CMakeLists.txt index f36564b0c3..ed0cecdcc5 100644 --- a/Source/Core/Core/CMakeLists.txt +++ b/Source/Core/Core/CMakeLists.txt @@ -266,7 +266,7 @@ if(LIBUSB_FOUND) set(LIBS ${LIBS} ${LIBUSB_LIBRARIES}) set(SRCS ${SRCS} IOS/USB/USB_HIDv4.cpp IOS/USB/Bluetooth/BTReal.cpp) -endif(LIBUSB_FOUND) +endif() if(NOT APPLE) set(LIBS ${LIBS} videovulkan) @@ -297,22 +297,22 @@ elseif(UNIX) endif() if(HIDAPI_FOUND) set(SRCS ${SRCS} HW/WiimoteReal/IOhidapi.cpp) -endif(HIDAPI_FOUND) +endif() if(PORTAUDIO_FOUND) set(LIBS ${LIBS} ${PORTAUDIO_LIBRARIES}) -endif(PORTAUDIO_FOUND) +endif() if(OPROFILE_FOUND) set(LIBS ${LIBS} ${OPROFILE_LIBRARIES}) -endif(OPROFILE_FOUND) +endif() if(GDBSTUB) set(SRCS ${SRCS} PowerPC/GDBStub.cpp) -endif(GDBSTUB) +endif() if(UNIX) set(SRCS ${SRCS} MemoryWatcher.cpp) -endif(UNIX) +endif() add_dolphin_library(core "${SRCS}" "${LIBS}") From bf2890f1f811c3928459cf533a95cb92637b059a Mon Sep 17 00:00:00 2001 From: Florent Castelli Date: Wed, 25 Jan 2017 06:27:05 +0100 Subject: [PATCH 2/4] cmake: Change else(.*) to else() --- CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8378097c2d..5b56f9a4ea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -683,7 +683,7 @@ find_package(ZLIB) if(ZLIB_FOUND) message(STATUS "Using shared zlib") include_directories(${ZLIB_INCLUDE_DIRS}) -else(ZLIB_FOUND) +else() message(STATUS "Shared zlib not found, falling back to the static library") add_subdirectory(Externals/zlib) include_directories(Externals/zlib) @@ -733,14 +733,14 @@ if(ENABLE_SDL) message(STATUS "Using shared SDL2") add_definitions(-DHAVE_SDL=1) include_directories(${SDL2_INCLUDE_DIR}) - else(SDL2_FOUND) + else() # SDL2 not found, try SDL find_package(SDL OPTIONAL) if(SDL_FOUND) message(STATUS "Using shared SDL") add_definitions(-DHAVE_SDL=1) include_directories(${SDL_INCLUDE_DIR}) - else(SDL_FOUND) + else() message(STATUS "SDL NOT found, disabling SDL input") endif() endif() @@ -935,7 +935,7 @@ if(NOT DISABLE_WX) if(wxWidgets_FOUND) include(${wxWidgets_USE_FILE}) message(STATUS "wxWidgets found, enabling GUI build") - else(wxWidgets_FOUND) + else() message(STATUS "Using static wxWidgets from Externals") # These definitions and includes are used when building dolphin against wx, From 103361c8468138a43265e32d45d2e8bc18930a37 Mon Sep 17 00:00:00 2001 From: Florent Castelli Date: Wed, 25 Jan 2017 06:27:55 +0100 Subject: [PATCH 3/4] cmake: Change endforeach(.*) to endforeach() --- Source/Core/DolphinWX/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/DolphinWX/CMakeLists.txt b/Source/Core/DolphinWX/CMakeLists.txt index 3c9efc81b2..8ebdf451b7 100644 --- a/Source/Core/DolphinWX/CMakeLists.txt +++ b/Source/Core/DolphinWX/CMakeLists.txt @@ -189,7 +189,7 @@ if(wxWidgets_FOUND) ${BUNDLE_PATH}/Contents/Resources/\${TRANSLATION_DIR}/\${TRANSLATION_FILE} ${BUNDLE_PATH}/Contents/Resources/\${TRANSLATION_DIR}/dolphin-emu.mo ) - endforeach(TRANSLATION_FILE) + endforeach() ") file(GLOB PO_FILES RELATIVE ${CMAKE_SOURCE_DIR}/Languages/po From 223e213bcfdb0bbe3d800983118d3618f83ab61e Mon Sep 17 00:00:00 2001 From: Florent Castelli Date: Wed, 25 Jan 2017 06:29:30 +0100 Subject: [PATCH 4/4] cmake: Change endmacro(.*) to endmacro() --- Source/CMakeLists.txt | 2 +- Source/UnitTests/CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt index a13a96d70b..9d886827f4 100644 --- a/Source/CMakeLists.txt +++ b/Source/CMakeLists.txt @@ -11,7 +11,7 @@ add_definitions(-D__STDC_CONSTANT_MACROS) macro(add_dolphin_library lib srcs libs) add_library(${lib} STATIC ${srcs}) target_link_libraries(${lib} ${libs}) -endmacro(add_dolphin_library) +endmacro() add_subdirectory(Core) if (ANDROID) diff --git a/Source/UnitTests/CMakeLists.txt b/Source/UnitTests/CMakeLists.txt index ade9345a00..d66dfd7129 100644 --- a/Source/UnitTests/CMakeLists.txt +++ b/Source/UnitTests/CMakeLists.txt @@ -17,7 +17,7 @@ macro(add_dolphin_test target srcs) target_link_libraries(Test_${target} ${LIBS}) add_dependencies(unittests Test_${target}) add_test(NAME ${target} COMMAND ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/Tests/${target}) -endmacro(add_dolphin_test) +endmacro() add_subdirectory(TestUtils)