CMake: Re-use external xbyak target if present (#62)
This commit is contained in:
parent
5bea2e1680
commit
34e19f135c
3 changed files with 8 additions and 3 deletions
|
@ -96,9 +96,6 @@ include_directories(${Boost_INCLUDE_DIRS})
|
|||
include_directories(externals/catch)
|
||||
enable_testing(true) # Enables unit-testing.
|
||||
|
||||
# Include Xbyak
|
||||
include_directories(externals/xbyak/xbyak)
|
||||
|
||||
# Include LLVM
|
||||
if (DYNARMIC_USE_LLVM)
|
||||
find_package(LLVM REQUIRED CONFIG)
|
||||
|
|
7
externals/CMakeLists.txt
vendored
7
externals/CMakeLists.txt
vendored
|
@ -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()
|
||||
|
|
|
@ -107,3 +107,4 @@ target_link_libraries(dynarmic PRIVATE fmt-header-only)
|
|||
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
||||
target_compile_definitions(dynarmic PRIVATE FMT_USE_WINDOWS_H=0)
|
||||
endif()
|
||||
target_link_libraries(dynarmic PRIVATE xbyak)
|
||||
|
|
Loading…
Reference in a new issue