summaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-01-04 06:13:23 +0100
committerbunnei <bunneidev@gmail.com>2018-01-04 06:13:23 +0100
commit3f8b9181b553e8af9bd93899832ddc2c8cf73e8b (patch)
tree00df941867db6c14f172f6eb4ed99964ac3bc5b3 /CMakeLists.txt
parentDownloadExternals: Use yuzu repo. (diff)
downloadyuzu-3f8b9181b553e8af9bd93899832ddc2c8cf73e8b.tar
yuzu-3f8b9181b553e8af9bd93899832ddc2c8cf73e8b.tar.gz
yuzu-3f8b9181b553e8af9bd93899832ddc2c8cf73e8b.tar.bz2
yuzu-3f8b9181b553e8af9bd93899832ddc2c8cf73e8b.tar.lz
yuzu-3f8b9181b553e8af9bd93899832ddc2c8cf73e8b.tar.xz
yuzu-3f8b9181b553e8af9bd93899832ddc2c8cf73e8b.tar.zst
yuzu-3f8b9181b553e8af9bd93899832ddc2c8cf73e8b.zip
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt31
1 files changed, 31 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d9c2f78a2..c45c830c7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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)