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() # Avoid windows.h from including some usually unused libs like winsocks.h, since this might cause some redefinition errors. add_definitions(/DWIN32_LEAN_AND_MEAN) - # set up output paths for executable binaries (.exe-files, and .dll-files on DLL-capable platforms) - set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin) set(CMAKE_CONFIGURATION_TYPES Debug Release CACHE STRING "" FORCE) # Tweak optimization settings @@ -269,10 +267,18 @@ if (YUZU_USE_BUNDLED_UNICORN) find_package(PythonInterp 2.7 REQUIRED) - add_custom_command(OUTPUT ${LIBUNICORN_LIBRARY} - COMMAND ${CMAKE_COMMAND} -E env UNICORN_ARCHS="aarch64" PYTHON="${PYTHON_EXECUTABLE}" /bin/sh make.sh macos-universal-no - WORKING_DIRECTORY ${UNICORN_PREFIX} - ) + if (MINGW) + add_custom_command(OUTPUT ${LIBUNICORN_LIBRARY} + COMMAND ${CMAKE_COMMAND} -E env UNICORN_ARCHS="aarch64" PYTHON="${PYTHON_EXECUTABLE}" /bin/sh make.sh cross-win64 + WORKING_DIRECTORY ${UNICORN_PREFIX} + ) + else() + add_custom_command(OUTPUT ${LIBUNICORN_LIBRARY} + COMMAND ${CMAKE_COMMAND} -E env UNICORN_ARCHS="aarch64" PYTHON="${PYTHON_EXECUTABLE}" /bin/sh make.sh macos-universal-no + WORKING_DIRECTORY ${UNICORN_PREFIX} + ) + endif() + # ALL makes this custom target build every time # but it won't actually build if LIBUNICORN_LIBRARY is up to date add_custom_target(unicorn-build ALL @@ -286,6 +292,7 @@ endif() if (UNICORN_FOUND) add_library(unicorn INTERFACE) + add_dependencies(unicorn unicorn-build) target_link_libraries(unicorn INTERFACE "${LIBUNICORN_LIBRARY}") target_include_directories(unicorn INTERFACE "${LIBUNICORN_INCLUDE_DIR}") else() @@ -431,8 +438,12 @@ enable_testing() add_subdirectory(externals) add_subdirectory(src) -# Set yuzu project as default StartUp Project in Visual Studio -set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT yuzu) +# Set yuzu project or yuzu-cmd project as default StartUp Project in Visual Studio depending on whether QT is enabled or not +if(ENABLE_QT) + set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT yuzu) +else() + set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT yuzu-cmd) +endif() # Installation instructions |