Add CMake build files

This commit is contained in:
David Hrdlička
2021-01-12 18:22:40 +01:00
parent 4a87af237a
commit 11b6604196
29 changed files with 679 additions and 46 deletions

View File

@@ -0,0 +1,17 @@
if(DYNAREC)
add_library(dynarec OBJECT codegen.c codegen_ops.c)
if(CMAKE_TARGET_ARCHITECTURES STREQUAL "i386")
target_sources(dynarec PRIVATE codegen_x86.c
codegen_accumulate_x86.c)
elseif(CMAKE_TARGET_ARCHITECTURES STREQUAL "x86_64")
target_sources(dynarec PRIVATE codegen_x86-64.c
codegen_accumulate_x86-64.c)
else()
message(SEND_ERROR
"Dynarec is incompatible with target platform "
${CMAKE_TARGET_ARCHITECTURES})
endif()
target_link_libraries(86Box dynarec cgt)
endif()