CMake: Re-use external xbyak target if present (#62)

This commit is contained in:
Yuri Kunde Schlesner 2016-12-12 06:23:42 -08:00 committed by Merry
parent 5bea2e1680
commit 34e19f135c
3 changed files with 8 additions and 3 deletions

View file

@ -6,3 +6,10 @@ if (NOT DYNARMIC_NO_BUNDLED_FMT)
# fmtlib formatting library
add_subdirectory(fmt)
endif()
if (NOT TARGET xbyak)
if (ARCHITECTURE_x86 OR ARCHITECTURE_x86_64)
add_library(xbyak INTERFACE)
target_include_directories(xbyak INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/xbyak/xbyak)
endif()
endif()