CMakeLists: Allow building on arm64
This commit is contained in:
parent
2779f24862
commit
e44ac5b84c
3 changed files with 24 additions and 13 deletions
|
@ -55,8 +55,6 @@ add_library(dynarmic
|
|||
common/u128.cpp
|
||||
common/u128.h
|
||||
common/variant_util.h
|
||||
common/x64_disassemble.cpp
|
||||
common/x64_disassemble.h
|
||||
frontend/A32/a32_types.cpp
|
||||
frontend/A32/a32_types.h
|
||||
frontend/A64/a64_types.cpp
|
||||
|
@ -257,6 +255,12 @@ if ("A64" IN_LIST DYNARMIC_FRONTENDS)
|
|||
endif()
|
||||
|
||||
if (ARCHITECTURE STREQUAL "x86_64")
|
||||
target_link_libraries(dynarmic
|
||||
PRIVATE
|
||||
$<BUILD_INTERFACE:xbyak>
|
||||
$<BUILD_INTERFACE:Zydis>
|
||||
)
|
||||
|
||||
target_sources(dynarmic PRIVATE
|
||||
backend/x64/abi.cpp
|
||||
backend/x64/abi.h
|
||||
|
@ -300,6 +304,8 @@ if (ARCHITECTURE STREQUAL "x86_64")
|
|||
backend/x64/stack_layout.h
|
||||
common/spin_lock_x64.cpp
|
||||
common/spin_lock_x64.h
|
||||
common/x64_disassemble.cpp
|
||||
common/x64_disassemble.h
|
||||
)
|
||||
|
||||
if ("A32" IN_LIST DYNARMIC_FRONTENDS)
|
||||
|
@ -383,8 +389,6 @@ target_link_libraries(dynarmic
|
|||
$<BUILD_INTERFACE:boost>
|
||||
$<BUILD_INTERFACE:fmt::fmt>
|
||||
tsl::robin_map
|
||||
$<BUILD_INTERFACE:xbyak>
|
||||
$<BUILD_INTERFACE:Zydis>
|
||||
"$<$<BOOL:DYNARMIC_USE_LLVM>:${llvm_libs}>"
|
||||
)
|
||||
if (DYNARMIC_ENABLE_CPU_FEATURE_DETECTION)
|
||||
|
|
|
@ -9,7 +9,6 @@ add_executable(dynarmic_tests
|
|||
A32/testenv.h
|
||||
A64/a64.cpp
|
||||
A64/testenv.h
|
||||
cpu_info.cpp
|
||||
decoder_tests.cpp
|
||||
fp/FPToFixed.cpp
|
||||
fp/FPValue.cpp
|
||||
|
@ -19,13 +18,6 @@ add_executable(dynarmic_tests
|
|||
rand_int.h
|
||||
)
|
||||
|
||||
if (NOT MSVC)
|
||||
target_sources(dynarmic_tests PRIVATE
|
||||
rsqrt_test.cpp
|
||||
rsqrt_test_fn.s
|
||||
)
|
||||
endif()
|
||||
|
||||
if (DYNARMIC_TESTS_USE_UNICORN)
|
||||
target_sources(dynarmic_tests PRIVATE
|
||||
A32/fuzz_arm.cpp
|
||||
|
@ -43,6 +35,21 @@ if (DYNARMIC_TESTS_USE_UNICORN)
|
|||
target_link_libraries(dynarmic_tests PRIVATE Unicorn::Unicorn)
|
||||
endif()
|
||||
|
||||
if (ARCHITECTURE STREQUAL "x86_64")
|
||||
target_link_libraries(dynarmic_tests PRIVATE xbyak)
|
||||
|
||||
target_sources(dynarmic_tests PRIVATE
|
||||
x64_cpu_info.cpp
|
||||
)
|
||||
|
||||
if (NOT MSVC)
|
||||
target_sources(dynarmic_tests PRIVATE
|
||||
rsqrt_test.cpp
|
||||
rsqrt_test_fn.s
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_executable(dynarmic_print_info
|
||||
print_info.cpp
|
||||
)
|
||||
|
@ -51,7 +58,7 @@ include(CreateDirectoryGroups)
|
|||
create_target_directory_groups(dynarmic_tests)
|
||||
create_target_directory_groups(dynarmic_print_info)
|
||||
|
||||
target_link_libraries(dynarmic_tests PRIVATE dynarmic boost catch fmt xbyak)
|
||||
target_link_libraries(dynarmic_tests PRIVATE dynarmic boost catch fmt)
|
||||
target_include_directories(dynarmic_tests PRIVATE . ../src)
|
||||
target_compile_options(dynarmic_tests PRIVATE ${DYNARMIC_CXX_FLAGS})
|
||||
target_compile_definitions(dynarmic_tests PRIVATE FMT_USE_USER_DEFINED_LITERALS=1 CATCH_CONFIG_ENABLE_BENCHMARKING=1)
|
||||
|
|
Loading…
Reference in a new issue