From 904057e611bb3c7e6be2aff39cd9940636049e11 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 6 Jul 2018 13:13:19 -0400 Subject: [PATCH 1/4] CMakeLists: Use lowercase for commands The general convention for CMake is to use lowercase for commands, and given we also follow that convention through most CMake files, this just makes it more consistent. --- CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 125eb278ff..1c4af4e0f4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -129,19 +129,19 @@ if(GIT_FOUND) set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${dolphin_git_head_symbolic_filename}") # defines DOLPHIN_WC_REVISION - EXECUTE_PROCESS(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} rev-parse HEAD + execute_process(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} rev-parse HEAD OUTPUT_VARIABLE DOLPHIN_WC_REVISION OUTPUT_STRIP_TRAILING_WHITESPACE) # defines DOLPHIN_WC_DESCRIBE - EXECUTE_PROCESS(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} describe --always --long --dirty + execute_process(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} describe --always --long --dirty OUTPUT_VARIABLE DOLPHIN_WC_DESCRIBE OUTPUT_STRIP_TRAILING_WHITESPACE) # remove hash (and trailing "-0" if needed) from description - STRING(REGEX REPLACE "(-0)?-[^-]+((-dirty)?)$" "\\2" DOLPHIN_WC_DESCRIBE "${DOLPHIN_WC_DESCRIBE}") + string(REGEX REPLACE "(-0)?-[^-]+((-dirty)?)$" "\\2" DOLPHIN_WC_DESCRIBE "${DOLPHIN_WC_DESCRIBE}") # defines DOLPHIN_WC_BRANCH - EXECUTE_PROCESS(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD + execute_process(WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} COMMAND ${GIT_EXECUTABLE} rev-parse --abbrev-ref HEAD OUTPUT_VARIABLE DOLPHIN_WC_BRANCH OUTPUT_STRIP_TRAILING_WHITESPACE) endif() @@ -553,7 +553,7 @@ if(USE_SHARED_ENET) # dropped; ugh, cmake set(CMAKE_REQUIRED_FLAGS ${ENET_LDFLAGS}) set(CMAKE_REQUIRED_LIBRARIES ${ENET_LIBRARIES}) - CHECK_SYMBOL_EXISTS(enet_socket_get_address enet/enet.h ENET_HAVE_SGA) + check_symbol_exists(enet_socket_get_address enet/enet.h ENET_HAVE_SGA) set(CMAKE_REQUIRED_INCLUDES) set(CMAKE_REQUIRED_FLAGS) set(CMAKE_REQUIRED_LIBRARIES) From 23bc463ec96bfceade0f887f7643c16e2f6e9814 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 6 Jul 2018 13:20:39 -0400 Subject: [PATCH 2/4] CMakeLists: Uppercase "string" in deployment target setting for macOS The documentation for setting cache entries dicates that the type must either be BOOL, FILEPATH, PATH, STRING, or INTERNAL (with those exact casings). Also, given we properly case it in other places, this is just consistent. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1c4af4e0f4..6f7f9a1992 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -7,7 +7,7 @@ set(CMAKE_OSX_ARCHITECTURES "x86_64") # This is inserted into the Info.plist as well. # Note that the SDK determines the maximum version of which optional # features can be used, not the minimum required version to run. -set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE string "") +set(CMAKE_OSX_DEPLOYMENT_TARGET "10.9" CACHE STRING "") project(dolphin-emu) From a7cf1548b029d22430638468a23429b125893ce6 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 6 Jul 2018 13:23:26 -0400 Subject: [PATCH 3/4] CMakeLists: Remove trailing space While we're in the same area, amend the newlining of the if block --- CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6f7f9a1992..86415c18a1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -701,11 +701,10 @@ if(NOT ANDROID) endif() endif() - if(USE_DISCORD_PRESENCE) message(STATUS "Using static DiscordRPC from Externals") add_subdirectory(Externals/discord-rpc) -endif() +endif() find_package(Libsystemd) if(SYSTEMD_FOUND) From 0a4c0a9b4b68b8a95b0eb86da95d448f1a47f558 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Fri, 6 Jul 2018 13:24:21 -0400 Subject: [PATCH 4/4] CMakeLists: Replace tab indentation with spaces We use spaces everywhere else in the CMake scripts, so this just makes indentation consistent. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 86415c18a1..0d474a607e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -680,8 +680,8 @@ else() endif() if (NOT ANDROID) - find_library(ICONV_LIBRARIES NAMES iconv libiconv libiconv-2 c) - find_path(ICONV_INCLUDE_DIR NAMES iconv.h) + find_library(ICONV_LIBRARIES NAMES iconv libiconv libiconv-2 c) + find_path(ICONV_INCLUDE_DIR NAMES iconv.h) endif() if (NOT ANDROID AND ICONV_LIBRARIES AND ICONV_INCLUDE_DIR)