diff options
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 500d099fc..30642edd7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
| @@ -269,10 +269,18 @@ if (YUZU_USE_BUNDLED_UNICORN) | |||
| 269 | 269 | ||
| 270 | find_package(PythonInterp 2.7 REQUIRED) | 270 | find_package(PythonInterp 2.7 REQUIRED) |
| 271 | 271 | ||
| 272 | add_custom_command(OUTPUT ${LIBUNICORN_LIBRARY} | 272 | if (MINGW) |
| 273 | COMMAND ${CMAKE_COMMAND} -E env UNICORN_ARCHS="aarch64" PYTHON="${PYTHON_EXECUTABLE}" /bin/sh make.sh macos-universal-no | 273 | add_custom_command(OUTPUT ${LIBUNICORN_LIBRARY} |
| 274 | WORKING_DIRECTORY ${UNICORN_PREFIX} | 274 | COMMAND ${CMAKE_COMMAND} -E env UNICORN_ARCHS="aarch64" PYTHON="${PYTHON_EXECUTABLE}" /bin/sh make.sh cross-win64 |
| 275 | ) | 275 | WORKING_DIRECTORY ${UNICORN_PREFIX} |
| 276 | ) | ||
| 277 | else() | ||
| 278 | add_custom_command(OUTPUT ${LIBUNICORN_LIBRARY} | ||
| 279 | COMMAND ${CMAKE_COMMAND} -E env UNICORN_ARCHS="aarch64" PYTHON="${PYTHON_EXECUTABLE}" /bin/sh make.sh macos-universal-no | ||
| 280 | WORKING_DIRECTORY ${UNICORN_PREFIX} | ||
| 281 | ) | ||
| 282 | endif() | ||
| 283 | |||
| 276 | # ALL makes this custom target build every time | 284 | # ALL makes this custom target build every time |
| 277 | # but it won't actually build if LIBUNICORN_LIBRARY is up to date | 285 | # but it won't actually build if LIBUNICORN_LIBRARY is up to date |
| 278 | add_custom_target(unicorn-build ALL | 286 | add_custom_target(unicorn-build ALL |
| @@ -286,6 +294,7 @@ endif() | |||
| 286 | 294 | ||
| 287 | if (UNICORN_FOUND) | 295 | if (UNICORN_FOUND) |
| 288 | add_library(unicorn INTERFACE) | 296 | add_library(unicorn INTERFACE) |
| 297 | add_dependencies(unicorn unicorn-build) | ||
| 289 | target_link_libraries(unicorn INTERFACE "${LIBUNICORN_LIBRARY}") | 298 | target_link_libraries(unicorn INTERFACE "${LIBUNICORN_LIBRARY}") |
| 290 | target_include_directories(unicorn INTERFACE "${LIBUNICORN_INCLUDE_DIR}") | 299 | target_include_directories(unicorn INTERFACE "${LIBUNICORN_INCLUDE_DIR}") |
| 291 | else() | 300 | else() |