diff options
| author | 2015-02-03 12:42:46 -0500 | |
|---|---|---|
| committer | 2015-02-03 12:42:46 -0500 | |
| commit | a9b3f29b9039f0903d16921d8d76a90e66e519e7 (patch) | |
| tree | 61278905aef49d4c146180cd395f05fca3be07d9 | |
| parent | Merge pull request #532 from lioncash/warn (diff) | |
| parent | CMake: Inform the user when architecture auto-detection fails (diff) | |
| download | yuzu-a9b3f29b9039f0903d16921d8d76a90e66e519e7.tar.gz yuzu-a9b3f29b9039f0903d16921d8d76a90e66e519e7.tar.xz yuzu-a9b3f29b9039f0903d16921d8d76a90e66e519e7.zip | |
Merge pull request #483 from yuriks/cmake-fix
CMake: Inform the user when architecture auto-detection fails
| -rw-r--r-- | CMakeLists.txt | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index d70c872b2..516aba554 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
| @@ -16,7 +16,7 @@ else() | |||
| 16 | # Tweak optimization settings | 16 | # Tweak optimization settings |
| 17 | # As far as I can tell, there's no way to override the CMake defaults while leaving user | 17 | # As far as I can tell, there's no way to override the CMake defaults while leaving user |
| 18 | # changes intact, so we'll just clobber everything and say sorry. | 18 | # changes intact, so we'll just clobber everything and say sorry. |
| 19 | message(STATUS "Cache compiler flags ignored, please edit CMakeFiles.txt to change the flags.") | 19 | message(STATUS "Cache compiler flags ignored, please edit CMakeLists.txt to change the flags.") |
| 20 | # /MP - Multi-threaded compilation | 20 | # /MP - Multi-threaded compilation |
| 21 | # /MD - Multi-threaded runtime | 21 | # /MD - Multi-threaded runtime |
| 22 | # /Ox - Full optimization | 22 | # /Ox - Full optimization |
| @@ -66,8 +66,11 @@ if (ENABLE_GLFW) | |||
| 66 | if (MSVC) | 66 | if (MSVC) |
| 67 | if (CMAKE_SIZEOF_VOID_P EQUAL 8) | 67 | if (CMAKE_SIZEOF_VOID_P EQUAL 8) |
| 68 | set(TMP_ARCH "x64") | 68 | set(TMP_ARCH "x64") |
| 69 | else() | 69 | elseif (CMAKE_SIZEOF_VOID_P EQUAL 4) |
| 70 | set(TMP_ARCH "Win32") | 70 | set(TMP_ARCH "Win32") |
| 71 | else() | ||
| 72 | set(TMP_ARCH "UNKNOWN") | ||
| 73 | message(SEND_ERROR "Couldn't detect your compiler's architecture, you'll have to manually specify the GLFW library to use. (Try checking CMakeOutput.log to find out why.)") | ||
| 71 | endif() | 74 | endif() |
| 72 | 75 | ||
| 73 | if (MSVC11) # Visual C++ 2012 | 76 | if (MSVC11) # Visual C++ 2012 |
| @@ -84,8 +87,11 @@ if (ENABLE_GLFW) | |||
| 84 | # Assume mingw | 87 | # Assume mingw |
| 85 | if (CMAKE_SIZEOF_VOID_P EQUAL 8) | 88 | if (CMAKE_SIZEOF_VOID_P EQUAL 8) |
| 86 | set(TMP_ARCH "x86_64") | 89 | set(TMP_ARCH "x86_64") |
| 87 | else() | 90 | elseif (CMAKE_SIZEOF_VOID_P EQUAL 4) |
| 88 | set(TMP_ARCH "i686") | 91 | set(TMP_ARCH "i686") |
| 92 | else() | ||
| 93 | set(TMP_ARCH "UNKNOWN") | ||
| 94 | message(SEND_ERROR "Couldn't detect your compiler's architecture, you'll have to manually specify the GLFW library to use.") | ||
| 89 | endif() | 95 | endif() |
| 90 | 96 | ||
| 91 | set(TMP_TOOLSET "mingw-${TMP_ARCH}") | 97 | set(TMP_TOOLSET "mingw-${TMP_ARCH}") |