diff options
| author | 2018-01-21 13:05:32 -0500 | |
|---|---|---|
| committer | 2018-01-21 13:05:32 -0500 | |
| commit | 1bcc233245516f99aaa0afe1959c207ddb7c99d4 (patch) | |
| tree | 0be830f62b67c7896dff931279067d70bdc4e133 | |
| parent | Merge pull request #72 from N00byKing/patch-2 (diff) | |
| parent | CMakeLists: Fix unicorn build for macOS developers with x86_64-only systems (diff) | |
| download | yuzu-1bcc233245516f99aaa0afe1959c207ddb7c99d4.tar.gz yuzu-1bcc233245516f99aaa0afe1959c207ddb7c99d4.tar.xz yuzu-1bcc233245516f99aaa0afe1959c207ddb7c99d4.zip | |
Merge pull request #125 from MerryMage/bundled-unicorn
Unicorn build fixups
| -rw-r--r-- | CMakeLists.txt | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 5dee41abc..5e904a53f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
| @@ -15,6 +15,8 @@ CMAKE_DEPENDENT_OPTION(YUZU_USE_BUNDLED_SDL2 "Download bundled SDL2 binaries" ON | |||
| 15 | option(ENABLE_QT "Enable the Qt frontend" ON) | 15 | option(ENABLE_QT "Enable the Qt frontend" ON) |
| 16 | CMAKE_DEPENDENT_OPTION(YUZU_USE_BUNDLED_QT "Download bundled Qt binaries" ON "ENABLE_SDL2;MSVC" OFF) | 16 | CMAKE_DEPENDENT_OPTION(YUZU_USE_BUNDLED_QT "Download bundled Qt binaries" ON "ENABLE_SDL2;MSVC" OFF) |
| 17 | 17 | ||
| 18 | option(YUZU_USE_BUNDLED_UNICORN "Build/Download bundled Unicorn" ON) | ||
| 19 | |||
| 18 | if(NOT EXISTS ${CMAKE_SOURCE_DIR}/.git/hooks/pre-commit) | 20 | if(NOT EXISTS ${CMAKE_SOURCE_DIR}/.git/hooks/pre-commit) |
| 19 | message(STATUS "Copying pre-commit hook") | 21 | message(STATUS "Copying pre-commit hook") |
| 20 | file(COPY hooks/pre-commit | 22 | file(COPY hooks/pre-commit |
| @@ -209,8 +211,7 @@ else() | |||
| 209 | endif() | 211 | endif() |
| 210 | 212 | ||
| 211 | # If unicorn isn't found, msvc -> download bundled unicorn; everyone else -> build external | 213 | # If unicorn isn't found, msvc -> download bundled unicorn; everyone else -> build external |
| 212 | find_package(Unicorn QUIET) | 214 | if (YUZU_USE_BUNDLED_UNICORN) |
| 213 | if (NOT UNICORN_FOUND) | ||
| 214 | if (MSVC) | 215 | if (MSVC) |
| 215 | message(STATUS "unicorn not found, falling back to bundled") | 216 | message(STATUS "unicorn not found, falling back to bundled") |
| 216 | # Detect toolchain and platform | 217 | # Detect toolchain and platform |
| @@ -249,7 +250,7 @@ if (NOT UNICORN_FOUND) | |||
| 249 | find_package(PythonInterp 2.7 REQUIRED) | 250 | find_package(PythonInterp 2.7 REQUIRED) |
| 250 | 251 | ||
| 251 | add_custom_command(OUTPUT ${LIBUNICORN_LIBRARY} | 252 | add_custom_command(OUTPUT ${LIBUNICORN_LIBRARY} |
| 252 | COMMAND ${CMAKE_COMMAND} -E env UNICORN_ARCHS="aarch64" PYTHON="${PYTHON_EXECUTABLE}" /bin/sh make.sh | 253 | COMMAND ${CMAKE_COMMAND} -E env UNICORN_ARCHS="aarch64" PYTHON="${PYTHON_EXECUTABLE}" /bin/sh make.sh macos-universal-no |
| 253 | WORKING_DIRECTORY ${UNICORN_PREFIX} | 254 | WORKING_DIRECTORY ${UNICORN_PREFIX} |
| 254 | ) | 255 | ) |
| 255 | # ALL makes this custom target build every time | 256 | # ALL makes this custom target build every time |
| @@ -259,6 +260,8 @@ if (NOT UNICORN_FOUND) | |||
| 259 | ) | 260 | ) |
| 260 | unset(UNICORN_LIB_NAME) | 261 | unset(UNICORN_LIB_NAME) |
| 261 | endif() | 262 | endif() |
| 263 | else() | ||
| 264 | find_package(Unicorn REQUIRED) | ||
| 262 | endif() | 265 | endif() |
| 263 | 266 | ||
| 264 | if (UNICORN_FOUND) | 267 | if (UNICORN_FOUND) |