diff options
Diffstat (limited to 'CMakeLists.txt')
| -rw-r--r-- | CMakeLists.txt | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 500d099fc..cd990188e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
| @@ -123,8 +123,6 @@ else() | |||
| 123 | # Avoid windows.h from including some usually unused libs like winsocks.h, since this might cause some redefinition errors. | 123 | # Avoid windows.h from including some usually unused libs like winsocks.h, since this might cause some redefinition errors. |
| 124 | add_definitions(/DWIN32_LEAN_AND_MEAN) | 124 | add_definitions(/DWIN32_LEAN_AND_MEAN) |
| 125 | 125 | ||
| 126 | # set up output paths for executable binaries (.exe-files, and .dll-files on DLL-capable platforms) | ||
| 127 | set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) | ||
| 128 | set(CMAKE_CONFIGURATION_TYPES Debug Release CACHE STRING "" FORCE) | 126 | set(CMAKE_CONFIGURATION_TYPES Debug Release CACHE STRING "" FORCE) |
| 129 | 127 | ||
| 130 | # Tweak optimization settings | 128 | # Tweak optimization settings |
| @@ -269,10 +267,18 @@ if (YUZU_USE_BUNDLED_UNICORN) | |||
| 269 | 267 | ||
| 270 | find_package(PythonInterp 2.7 REQUIRED) | 268 | find_package(PythonInterp 2.7 REQUIRED) |
| 271 | 269 | ||
| 272 | add_custom_command(OUTPUT ${LIBUNICORN_LIBRARY} | 270 | if (MINGW) |
| 273 | COMMAND ${CMAKE_COMMAND} -E env UNICORN_ARCHS="aarch64" PYTHON="${PYTHON_EXECUTABLE}" /bin/sh make.sh macos-universal-no | 271 | add_custom_command(OUTPUT ${LIBUNICORN_LIBRARY} |
| 274 | WORKING_DIRECTORY ${UNICORN_PREFIX} | 272 | COMMAND ${CMAKE_COMMAND} -E env UNICORN_ARCHS="aarch64" PYTHON="${PYTHON_EXECUTABLE}" /bin/sh make.sh cross-win64 |
| 275 | ) | 273 | WORKING_DIRECTORY ${UNICORN_PREFIX} |
| 274 | ) | ||
| 275 | else() | ||
| 276 | add_custom_command(OUTPUT ${LIBUNICORN_LIBRARY} | ||
| 277 | COMMAND ${CMAKE_COMMAND} -E env UNICORN_ARCHS="aarch64" PYTHON="${PYTHON_EXECUTABLE}" /bin/sh make.sh macos-universal-no | ||
| 278 | WORKING_DIRECTORY ${UNICORN_PREFIX} | ||
| 279 | ) | ||
| 280 | endif() | ||
| 281 | |||
| 276 | # ALL makes this custom target build every time | 282 | # ALL makes this custom target build every time |
| 277 | # but it won't actually build if LIBUNICORN_LIBRARY is up to date | 283 | # but it won't actually build if LIBUNICORN_LIBRARY is up to date |
| 278 | add_custom_target(unicorn-build ALL | 284 | add_custom_target(unicorn-build ALL |
| @@ -286,6 +292,7 @@ endif() | |||
| 286 | 292 | ||
| 287 | if (UNICORN_FOUND) | 293 | if (UNICORN_FOUND) |
| 288 | add_library(unicorn INTERFACE) | 294 | add_library(unicorn INTERFACE) |
| 295 | add_dependencies(unicorn unicorn-build) | ||
| 289 | target_link_libraries(unicorn INTERFACE "${LIBUNICORN_LIBRARY}") | 296 | target_link_libraries(unicorn INTERFACE "${LIBUNICORN_LIBRARY}") |
| 290 | target_include_directories(unicorn INTERFACE "${LIBUNICORN_INCLUDE_DIR}") | 297 | target_include_directories(unicorn INTERFACE "${LIBUNICORN_INCLUDE_DIR}") |
| 291 | else() | 298 | else() |
| @@ -431,8 +438,12 @@ enable_testing() | |||
| 431 | add_subdirectory(externals) | 438 | add_subdirectory(externals) |
| 432 | add_subdirectory(src) | 439 | add_subdirectory(src) |
| 433 | 440 | ||
| 434 | # Set yuzu project as default StartUp Project in Visual Studio | 441 | # Set yuzu project or yuzu-cmd project as default StartUp Project in Visual Studio depending on whether QT is enabled or not |
| 435 | set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT yuzu) | 442 | if(ENABLE_QT) |
| 443 | set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT yuzu) | ||
| 444 | else() | ||
| 445 | set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT yuzu-cmd) | ||
| 446 | endif() | ||
| 436 | 447 | ||
| 437 | 448 | ||
| 438 | # Installation instructions | 449 | # Installation instructions |