2019-10-04 03:54:09 +00:00
|
|
|
add_library(core
|
2022-07-11 13:03:29 +00:00
|
|
|
achievements.h
|
2019-12-15 11:58:27 +00:00
|
|
|
analog_controller.cpp
|
|
|
|
analog_controller.h
|
2020-11-13 07:36:36 +00:00
|
|
|
analog_joystick.cpp
|
|
|
|
analog_joystick.h
|
2019-11-16 05:27:57 +00:00
|
|
|
bios.cpp
|
|
|
|
bios.h
|
2019-10-15 08:02:48 +00:00
|
|
|
bus.cpp
|
|
|
|
bus.h
|
|
|
|
cdrom.cpp
|
|
|
|
cdrom.h
|
2020-02-21 15:19:10 +00:00
|
|
|
cdrom_async_reader.cpp
|
|
|
|
cdrom_async_reader.h
|
2020-09-09 12:11:28 +00:00
|
|
|
cheats.cpp
|
|
|
|
cheats.h
|
2019-12-08 14:51:52 +00:00
|
|
|
controller.cpp
|
|
|
|
controller.h
|
2023-08-13 06:28:28 +00:00
|
|
|
common_host.cpp
|
|
|
|
common_host.h
|
2019-11-19 10:30:04 +00:00
|
|
|
cpu_code_cache.cpp
|
|
|
|
cpu_code_cache.h
|
2019-10-04 03:54:09 +00:00
|
|
|
cpu_core.cpp
|
|
|
|
cpu_core.h
|
2020-08-08 05:15:56 +00:00
|
|
|
cpu_core_private.h
|
2019-10-15 08:02:48 +00:00
|
|
|
cpu_disasm.cpp
|
|
|
|
cpu_disasm.h
|
2019-11-19 10:30:04 +00:00
|
|
|
cpu_types.cpp
|
2019-10-15 08:02:48 +00:00
|
|
|
cpu_types.h
|
|
|
|
digital_controller.cpp
|
|
|
|
digital_controller.h
|
|
|
|
dma.cpp
|
|
|
|
dma.h
|
2023-08-13 06:28:28 +00:00
|
|
|
fullscreen_ui.cpp
|
|
|
|
fullscreen_ui.h
|
2022-07-11 13:03:29 +00:00
|
|
|
game_database.cpp
|
|
|
|
game_database.h
|
2023-08-13 06:28:28 +00:00
|
|
|
game_list.cpp
|
|
|
|
game_list.h
|
2020-12-17 17:29:10 +00:00
|
|
|
gdb_protocol.cpp
|
|
|
|
gdb_protocol.h
|
2019-10-15 08:02:48 +00:00
|
|
|
gpu.cpp
|
|
|
|
gpu.h
|
2020-11-21 03:32:58 +00:00
|
|
|
gpu_backend.cpp
|
|
|
|
gpu_backend.h
|
2019-10-20 12:31:45 +00:00
|
|
|
gpu_commands.cpp
|
2019-10-15 08:02:48 +00:00
|
|
|
gpu_hw.cpp
|
|
|
|
gpu_hw.h
|
2019-11-03 03:36:54 +00:00
|
|
|
gpu_hw_shadergen.cpp
|
|
|
|
gpu_hw_shadergen.h
|
2019-10-26 02:57:35 +00:00
|
|
|
gpu_sw.cpp
|
|
|
|
gpu_sw.h
|
2020-11-21 03:32:58 +00:00
|
|
|
gpu_sw_backend.cpp
|
|
|
|
gpu_sw_backend.h
|
2020-10-22 09:31:28 +00:00
|
|
|
gpu_types.h
|
2022-07-11 13:03:29 +00:00
|
|
|
guncon.cpp
|
|
|
|
guncon.h
|
2019-10-15 08:02:48 +00:00
|
|
|
gte.cpp
|
|
|
|
gte.h
|
|
|
|
gte_types.h
|
2022-07-11 13:03:29 +00:00
|
|
|
host.cpp
|
2022-07-08 14:25:16 +00:00
|
|
|
host.h
|
2020-07-21 14:03:01 +00:00
|
|
|
host_interface_progress_callback.cpp
|
|
|
|
host_interface_progress_callback.h
|
2023-08-13 06:28:28 +00:00
|
|
|
host_settings.cpp
|
2022-07-08 14:25:16 +00:00
|
|
|
host_settings.h
|
2023-01-15 04:00:51 +00:00
|
|
|
input_types.h
|
2023-08-13 06:28:28 +00:00
|
|
|
imgui_overlays.cpp
|
|
|
|
imgui_overlays.h
|
2019-10-15 08:02:48 +00:00
|
|
|
interrupt_controller.cpp
|
|
|
|
interrupt_controller.h
|
|
|
|
mdec.cpp
|
|
|
|
mdec.h
|
|
|
|
memory_card.cpp
|
|
|
|
memory_card.h
|
2020-09-18 14:26:19 +00:00
|
|
|
memory_card_image.cpp
|
|
|
|
memory_card_image.h
|
2021-01-21 07:59:40 +00:00
|
|
|
multitap.cpp
|
|
|
|
multitap.h
|
2020-05-30 04:33:55 +00:00
|
|
|
negcon.cpp
|
|
|
|
negcon.h
|
2019-10-15 08:02:48 +00:00
|
|
|
pad.cpp
|
|
|
|
pad.h
|
2023-04-29 10:45:39 +00:00
|
|
|
pcdrv.cpp
|
|
|
|
pcdrv.h
|
2020-08-01 14:25:07 +00:00
|
|
|
pgxp.cpp
|
|
|
|
pgxp.h
|
2020-04-29 03:59:49 +00:00
|
|
|
playstation_mouse.cpp
|
|
|
|
playstation_mouse.h
|
2020-04-16 14:29:56 +00:00
|
|
|
psf_loader.cpp
|
|
|
|
psf_loader.h
|
2020-06-30 14:35:02 +00:00
|
|
|
resources.cpp
|
|
|
|
resources.h
|
2019-10-15 08:02:48 +00:00
|
|
|
save_state_version.h
|
|
|
|
settings.cpp
|
|
|
|
settings.h
|
2021-01-11 04:50:25 +00:00
|
|
|
shader_cache_version.h
|
2019-12-07 11:09:02 +00:00
|
|
|
sio.cpp
|
|
|
|
sio.h
|
2019-10-15 08:02:48 +00:00
|
|
|
spu.cpp
|
|
|
|
spu.h
|
2019-10-04 03:54:09 +00:00
|
|
|
system.cpp
|
|
|
|
system.h
|
2020-12-25 08:02:38 +00:00
|
|
|
texture_replacements.cpp
|
|
|
|
texture_replacements.h
|
2019-10-15 08:02:48 +00:00
|
|
|
timers.cpp
|
|
|
|
timers.h
|
2020-01-24 04:53:40 +00:00
|
|
|
timing_event.cpp
|
|
|
|
timing_event.h
|
2019-10-04 03:54:09 +00:00
|
|
|
types.h
|
|
|
|
)
|
|
|
|
|
2019-11-27 15:55:33 +00:00
|
|
|
set(RECOMPILER_SRCS
|
|
|
|
cpu_recompiler_code_generator.cpp
|
|
|
|
cpu_recompiler_code_generator.h
|
|
|
|
cpu_recompiler_code_generator_generic.cpp
|
|
|
|
cpu_recompiler_register_cache.cpp
|
|
|
|
cpu_recompiler_register_cache.h
|
|
|
|
cpu_recompiler_thunks.h
|
|
|
|
cpu_recompiler_types.h
|
|
|
|
)
|
|
|
|
|
2019-10-04 03:54:09 +00:00
|
|
|
target_include_directories(core PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/..")
|
|
|
|
target_include_directories(core PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/..")
|
2022-07-08 12:43:38 +00:00
|
|
|
target_link_libraries(core PUBLIC Threads::Threads common util zlib)
|
2023-08-19 12:00:20 +00:00
|
|
|
target_link_libraries(core PRIVATE stb xxhash imgui rapidjson)
|
2021-01-07 15:11:19 +00:00
|
|
|
|
2019-11-19 10:30:04 +00:00
|
|
|
if(${CPU_ARCH} STREQUAL "x64")
|
2020-11-22 15:06:25 +00:00
|
|
|
target_include_directories(core PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../../dep/xbyak/xbyak")
|
|
|
|
target_compile_definitions(core PUBLIC "WITH_RECOMPILER=1" "WITH_MMAP_FASTMEM=1")
|
2019-11-27 15:55:33 +00:00
|
|
|
target_sources(core PRIVATE ${RECOMPILER_SRCS}
|
|
|
|
cpu_recompiler_code_generator_x64.cpp
|
|
|
|
)
|
2019-11-19 10:30:04 +00:00
|
|
|
message("Building x64 recompiler")
|
2020-11-20 16:06:44 +00:00
|
|
|
elseif(${CPU_ARCH} STREQUAL "aarch32")
|
2020-11-22 15:06:25 +00:00
|
|
|
target_compile_definitions(core PUBLIC "WITH_RECOMPILER=1")
|
2020-11-20 16:06:44 +00:00
|
|
|
target_sources(core PRIVATE ${RECOMPILER_SRCS}
|
|
|
|
cpu_recompiler_code_generator_aarch32.cpp
|
|
|
|
)
|
2020-11-22 15:06:25 +00:00
|
|
|
target_link_libraries(core PUBLIC vixl)
|
2020-11-20 16:06:44 +00:00
|
|
|
message("Building AArch32 recompiler")
|
2019-12-02 15:29:56 +00:00
|
|
|
elseif(${CPU_ARCH} STREQUAL "aarch64")
|
2022-08-06 15:27:34 +00:00
|
|
|
target_compile_definitions(core PUBLIC "WITH_RECOMPILER=1")
|
|
|
|
if (NOT APPLE)
|
|
|
|
# Disabled until we support 16K pages.
|
|
|
|
target_compile_definitions(core PUBLIC "WITH_MMAP_FASTMEM=1")
|
|
|
|
endif()
|
2019-12-02 15:29:56 +00:00
|
|
|
target_sources(core PRIVATE ${RECOMPILER_SRCS}
|
|
|
|
cpu_recompiler_code_generator_aarch64.cpp
|
|
|
|
)
|
2020-11-22 15:06:25 +00:00
|
|
|
target_link_libraries(core PUBLIC vixl)
|
2019-12-02 15:29:56 +00:00
|
|
|
message("Building AArch64 recompiler")
|
2019-11-19 10:30:04 +00:00
|
|
|
else()
|
|
|
|
message("Not building recompiler")
|
|
|
|
endif()
|
2022-03-26 13:51:37 +00:00
|
|
|
|
|
|
|
if(ENABLE_CHEEVOS)
|
2023-08-13 06:28:28 +00:00
|
|
|
target_sources(core PRIVATE
|
|
|
|
achievements.cpp
|
|
|
|
achievements_private.h
|
|
|
|
)
|
|
|
|
target_compile_definitions(core PUBLIC -DWITH_CHEEVOS=1)
|
|
|
|
target_link_libraries(core PRIVATE rcheevos rapidjson)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(ENABLE_DISCORD_PRESENCE)
|
|
|
|
target_compile_definitions(core PUBLIC -DWITH_DISCORD_PRESENCE=1)
|
|
|
|
target_link_libraries(core PRIVATE discord-rpc)
|
2022-03-26 13:51:37 +00:00
|
|
|
endif()
|
2023-08-13 06:28:28 +00:00
|
|
|
|
|
|
|
# Copy the provided data directory to the output directory.
|
|
|
|
add_custom_command(TARGET core POST_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_directory "${CMAKE_SOURCE_DIR}/data" "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}"
|
|
|
|
)
|