unicorn: Use for arm interface on Windows.

This commit is contained in:
bunnei 2018-01-04 00:13:23 -05:00
parent 095f320581
commit 3f8b9181b5
5 changed files with 273 additions and 9 deletions

View file

@ -12,6 +12,8 @@ option(CITRA_USE_BUNDLED_SDL2 "Download bundled SDL2 binaries" OFF)
option(ENABLE_QT "Enable the Qt frontend" ON)
option(CITRA_USE_BUNDLED_QT "Download bundled Qt binaries" OFF)
option(YUZU_USE_BUNDLED_UNICORN "Download bundled Unicorn binaries" OFF)
option(ENABLE_WEB_SERVICE "Enable web services (telemetry, etc.)" ON)
option(CITRA_USE_BUNDLED_CURL "FOR MINGW ONLY: Download curl configured against winssl instead of openssl" OFF)
if (ENABLE_WEB_SERVICE AND CITRA_USE_BUNDLED_CURL AND WINDOWS AND MSVC)
@ -210,6 +212,35 @@ else()
set(SDL2_FOUND NO)
endif()
if (YUZU_USE_BUNDLED_UNICORN)
# Detect toolchain and platform
if (MSVC14 AND ARCHITECTURE_x86_64)
set(UNICORN_VER "unicorn-1.0.1-yuzu")
else()
message(FATAL_ERROR "No bundled Unicorn binaries for your toolchain. Disable YUZU_USE_BUNDLED_UNICORN and provide your own.")
endif()
if (DEFINED UNICORN_VER)
download_bundled_external("unicorn/" ${UNICORN_VER} UNICORN_PREFIX)
endif()
if (DEFINED UNICORN_VER)
download_bundled_external("unicorn/" ${UNICORN_VER} UNICORN_PREFIX)
endif()
set(UNICORN_FOUND YES)
set(UNICORN_INCLUDE_DIR "${UNICORN_PREFIX}/include" CACHE PATH "Path to Unicorn headers")
set(UNICORN_LIBRARY "${UNICORN_PREFIX}/lib/x64/unicorn_static.lib" CACHE PATH "Path to Unicorn library")
else()
find_package(unicorn REQUIRED)
endif()
if (UNICORN_FOUND)
add_library(unicorn INTERFACE)
target_link_libraries(unicorn INTERFACE "${UNICORN_LIBRARY}")
target_include_directories(unicorn INTERFACE "${UNICORN_INCLUDE_DIR}")
endif()
if (ENABLE_QT)
if (CITRA_USE_BUNDLED_QT)
if (MSVC14 AND ARCHITECTURE_x86_64)