From b399186f18e57419f24e191a5e756e68eb55dc99 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 11 Aug 2018 19:36:19 -0400 Subject: [PATCH 1/2] CMakeLists: Change MSVC14 variable to MSVC_VERSION Use of the MSVC14 variable is discouraged in the CMake documentation (which makes sense, since MSVC_VERSION is the more general appliable variable). --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4d67916fb..b5e026bb6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -196,7 +196,7 @@ find_package(Threads REQUIRED) if (ENABLE_SDL2) if (CITRA_USE_BUNDLED_SDL2) # Detect toolchain and platform - if (MSVC14 AND ARCHITECTURE_x86_64) + if ((MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS 1920) AND ARCHITECTURE_x86_64) set(SDL2_VER "SDL2-2.0.5") else() message(FATAL_ERROR "No bundled SDL2 binaries for your toolchain. Disable CITRA_USE_BUNDLED_SDL2 and provide your own.") @@ -226,7 +226,7 @@ endif() if (ENABLE_QT) if (CITRA_USE_BUNDLED_QT) - if (MSVC14 AND ARCHITECTURE_x86_64) + if ((MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS 1920) AND ARCHITECTURE_x86_64) set(QT_VER qt-5.10.0-msvc2017_64) else() message(FATAL_ERROR "No bundled Qt binaries for your toolchain. Disable CITRA_USE_BUNDLED_QT and provide your own.") From f5ddcef340d35686095b0e72bb2e7685c4fe446f Mon Sep 17 00:00:00 2001 From: Lioncash Date: Sat, 4 Aug 2018 17:20:10 -0400 Subject: [PATCH 2/2] CMakeLists: lowercase find_library usage The rest of the CMake script uses lowercase for commands (which is the general CMake style), making it more consistent with surrounding code. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b5e026bb6..379cf14c1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -261,7 +261,7 @@ endif() # ====================================== IF (APPLE) - FIND_LIBRARY(COCOA_LIBRARY Cocoa) # Umbrella framework for everything GUI-related + find_library(COCOA_LIBRARY Cocoa) # Umbrella framework for everything GUI-related set(PLATFORM_LIBRARIES ${COCOA_LIBRARY} ${IOKIT_LIBRARY} ${COREVIDEO_LIBRARY}) if (CMAKE_CXX_COMPILER_ID STREQUAL Clang)