summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar bunnei2018-01-21 13:05:32 -0500
committerGravatar GitHub2018-01-21 13:05:32 -0500
commit1bcc233245516f99aaa0afe1959c207ddb7c99d4 (patch)
tree0be830f62b67c7896dff931279067d70bdc4e133
parentMerge pull request #72 from N00byKing/patch-2 (diff)
parentCMakeLists: Fix unicorn build for macOS developers with x86_64-only systems (diff)
downloadyuzu-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.txt9
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
15option(ENABLE_QT "Enable the Qt frontend" ON) 15option(ENABLE_QT "Enable the Qt frontend" ON)
16CMAKE_DEPENDENT_OPTION(YUZU_USE_BUNDLED_QT "Download bundled Qt binaries" ON "ENABLE_SDL2;MSVC" OFF) 16CMAKE_DEPENDENT_OPTION(YUZU_USE_BUNDLED_QT "Download bundled Qt binaries" ON "ENABLE_SDL2;MSVC" OFF)
17 17
18option(YUZU_USE_BUNDLED_UNICORN "Build/Download bundled Unicorn" ON)
19
18if(NOT EXISTS ${CMAKE_SOURCE_DIR}/.git/hooks/pre-commit) 20if(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()
209endif() 211endif()
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
212find_package(Unicorn QUIET) 214if (YUZU_USE_BUNDLED_UNICORN)
213if (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()
263else()
264 find_package(Unicorn REQUIRED)
262endif() 265endif()
263 266
264if (UNICORN_FOUND) 267if (UNICORN_FOUND)