aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAndrea Pappacoda <[email protected]>2022-11-24 16:36:55 +0100
committermerry <[email protected]>2022-11-24 16:09:13 +0000
commit7414f76ce92acb8abe4021a9297f90a4cee29a3a (patch)
treea0f14b8a1680a61085d16b23dbad764b35444f29
parenta5b57bb9cd1500a6e0a3c800b35c1984211dff1d (diff)
downloaddynarmic-7414f76ce92acb8abe4021a9297f90a4cee29a3a.tar.gz
dynarmic-7414f76ce92acb8abe4021a9297f90a4cee29a3a.zip
build: only require Zydis on x86
Zydis is only used on x86, and this patch allows compilation on ARM without Zydis installed.
-rw-r--r--CMakeLists.txt6
-rw-r--r--externals/CMakeLists.txt12
2 files changed, 11 insertions, 7 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cf3e69a5..9a8c4acf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -139,8 +139,10 @@ if (DYNARMIC_NO_BUNDLED_XBYAK AND NOT TARGET xbyak)
endif()
if (DYNARMIC_NO_BUNDLED_ZYDIS AND NOT TARGET Zydis)
- find_package(Zydis REQUIRED)
- add_library(Zydis ALIAS Zydis::Zydis)
+ if (ARCHITECTURE STREQUAL "x86" OR ARCHITECTURE STREQUAL "x86_64")
+ find_package(Zydis REQUIRED)
+ add_library(Zydis ALIAS Zydis::Zydis)
+ endif()
endif()
# Enable unit-testing.
diff --git a/externals/CMakeLists.txt b/externals/CMakeLists.txt
index abbb9a55..dcc25aaa 100644
--- a/externals/CMakeLists.txt
+++ b/externals/CMakeLists.txt
@@ -57,9 +57,11 @@ endif()
# zydis
if (NOT TARGET Zydis)
- option(ZYDIS_BUILD_TOOLS "" OFF)
- option(ZYDIS_BUILD_EXAMPLES "" OFF)
- option(ZYDIS_BUILD_DOXYGEN "" OFF)
- set(ZYAN_ZYCORE_PATH "${CMAKE_CURRENT_LIST_DIR}/zycore" CACHE PATH "")
- add_subdirectory(zydis EXCLUDE_FROM_ALL)
+ if (ARCHITECTURE STREQUAL "x86" OR ARCHITECTURE STREQUAL "x86_64")
+ option(ZYDIS_BUILD_TOOLS "" OFF)
+ option(ZYDIS_BUILD_EXAMPLES "" OFF)
+ option(ZYDIS_BUILD_DOXYGEN "" OFF)
+ set(ZYAN_ZYCORE_PATH "${CMAKE_CURRENT_LIST_DIR}/zycore" CACHE PATH "")
+ add_subdirectory(zydis EXCLUDE_FROM_ALL)
+ endif()
endif()