CMakeLists: Rework architecture detection

* Also only enable xybak/vixl on appropriate architectures
This commit is contained in:
MerryMage 2020-06-11 13:15:13 +01:00
parent 3d418e9a4f
commit 52a9af3dca
4 changed files with 52 additions and 17 deletions

View file

@ -27,12 +27,14 @@ target_include_directories(robin_map SYSTEM INTERFACE "$<BUILD_INTERFACE:${CMAKE
# vixl
add_subdirectory(vixl)
if (ARCHITECTURE STREQUAL "arm64")
add_subdirectory(vixl)
endif()
# xbyak
if (NOT TARGET xbyak)
if (ARCHITECTURE_x86 OR ARCHITECTURE_x86_64)
if (ARCHITECTURE STREQUAL "x86" OR ARCHITECTURE STREQUAL "x86_64")
add_library(xbyak INTERFACE)
target_include_directories(xbyak SYSTEM INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/xbyak/xbyak)
target_compile_definitions(xbyak INTERFACE XBYAK_NO_OP_NAMES)