build: only require Zydis on x86
Zydis is only used on x86, and this patch allows compilation on ARM without Zydis installed.
This commit is contained in:
parent
a5b57bb9cd
commit
7414f76ce9
2 changed files with 11 additions and 7 deletions
|
@ -139,9 +139,11 @@ if (DYNARMIC_NO_BUNDLED_XBYAK AND NOT TARGET xbyak)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (DYNARMIC_NO_BUNDLED_ZYDIS AND NOT TARGET Zydis)
|
if (DYNARMIC_NO_BUNDLED_ZYDIS AND NOT TARGET Zydis)
|
||||||
|
if (ARCHITECTURE STREQUAL "x86" OR ARCHITECTURE STREQUAL "x86_64")
|
||||||
find_package(Zydis REQUIRED)
|
find_package(Zydis REQUIRED)
|
||||||
add_library(Zydis ALIAS Zydis::Zydis)
|
add_library(Zydis ALIAS Zydis::Zydis)
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
# Enable unit-testing.
|
# Enable unit-testing.
|
||||||
enable_testing(true)
|
enable_testing(true)
|
||||||
|
|
2
externals/CMakeLists.txt
vendored
2
externals/CMakeLists.txt
vendored
|
@ -57,9 +57,11 @@ endif()
|
||||||
# zydis
|
# zydis
|
||||||
|
|
||||||
if (NOT TARGET Zydis)
|
if (NOT TARGET Zydis)
|
||||||
|
if (ARCHITECTURE STREQUAL "x86" OR ARCHITECTURE STREQUAL "x86_64")
|
||||||
option(ZYDIS_BUILD_TOOLS "" OFF)
|
option(ZYDIS_BUILD_TOOLS "" OFF)
|
||||||
option(ZYDIS_BUILD_EXAMPLES "" OFF)
|
option(ZYDIS_BUILD_EXAMPLES "" OFF)
|
||||||
option(ZYDIS_BUILD_DOXYGEN "" OFF)
|
option(ZYDIS_BUILD_DOXYGEN "" OFF)
|
||||||
set(ZYAN_ZYCORE_PATH "${CMAKE_CURRENT_LIST_DIR}/zycore" CACHE PATH "")
|
set(ZYAN_ZYCORE_PATH "${CMAKE_CURRENT_LIST_DIR}/zycore" CACHE PATH "")
|
||||||
add_subdirectory(zydis EXCLUDE_FROM_ALL)
|
add_subdirectory(zydis EXCLUDE_FROM_ALL)
|
||||||
endif()
|
endif()
|
||||||
|
endif()
|
||||||
|
|
Loading…
Reference in a new issue