Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
stenzek
GitHub Repository: stenzek/duckstation
Path: blob/master/src/core/CMakeLists.txt
7461 views
1
add_library(core
2
achievements.cpp
3
achievements.h
4
achievements_private.h
5
analog_controller.cpp
6
analog_controller.h
7
analog_joystick.cpp
8
analog_joystick.h
9
bios.cpp
10
bios.h
11
bus.cpp
12
bus.h
13
cdrom.cpp
14
cdrom.h
15
cdrom_async_reader.cpp
16
cdrom_async_reader.h
17
cdrom_subq_replacement.cpp
18
cdrom_subq_replacement.h
19
cheats.cpp
20
cheats.h
21
controller.cpp
22
controller.h
23
core.cpp
24
core.h
25
cpu_code_cache.cpp
26
cpu_code_cache.h
27
cpu_code_cache_private.h
28
cpu_core.cpp
29
cpu_core.h
30
cpu_core_private.h
31
cpu_disasm.cpp
32
cpu_disasm.h
33
cpu_pgxp.cpp
34
cpu_pgxp.h
35
cpu_types.cpp
36
cpu_types.h
37
ddgo_controller.cpp
38
ddgo_controller.h
39
digital_controller.cpp
40
digital_controller.h
41
dma.cpp
42
dma.h
43
fullscreenui.cpp
44
fullscreenui.h
45
fullscreenui_achievements.cpp
46
fullscreenui_game_list.cpp
47
fullscreenui_private.h
48
fullscreenui_settings.cpp
49
fullscreenui_widgets.cpp
50
fullscreenui_widgets.h
51
game_database.cpp
52
game_database.h
53
game_list.cpp
54
game_list.h
55
gdb_server.cpp
56
gdb_server.h
57
gpu.cpp
58
gpu.h
59
gpu_backend.cpp
60
gpu_backend.h
61
gpu_commands.cpp
62
gpu_dump.cpp
63
gpu_dump.h
64
gpu_helpers.h
65
gpu_hw.cpp
66
gpu_hw.h
67
gpu_hw_shadergen.cpp
68
gpu_hw_shadergen.h
69
gpu_hw_texture_cache.cpp
70
gpu_hw_texture_cache.h
71
gpu_sw.cpp
72
gpu_sw.h
73
gpu_sw_rasterizer.cpp
74
gpu_sw_rasterizer.h
75
gpu_types.h
76
guncon.cpp
77
guncon.h
78
gte.cpp
79
gte.h
80
gte_types.h
81
host.h
82
hotkeys.cpp
83
input_types.h
84
imgui_overlays.cpp
85
imgui_overlays.h
86
interrupt_controller.cpp
87
interrupt_controller.h
88
jogcon.cpp
89
jogcon.h
90
justifier.cpp
91
justifier.h
92
mdec.cpp
93
mdec.h
94
memory_card.cpp
95
memory_card.h
96
memory_card_image.cpp
97
memory_card_image.h
98
memory_scanner.cpp
99
memory_scanner.h
100
mips_encoder.h
101
multitap.cpp
102
multitap.h
103
negcon.cpp
104
negcon.h
105
negcon_rumble.cpp
106
negcon_rumble.h
107
pad.cpp
108
pad.h
109
pcdrv.cpp
110
pcdrv.h
111
performance_counters.cpp
112
performance_counters.h
113
pio.cpp
114
pio.h
115
playstation_mouse.cpp
116
playstation_mouse.h
117
psf_loader.cpp
118
psf_loader.h
119
save_state_version.h
120
settings.cpp
121
settings.h
122
shader_cache_version.h
123
sio.cpp
124
sio.h
125
sound_effect_manager.cpp
126
sound_effect_manager.h
127
spu.cpp
128
spu.h
129
system.cpp
130
system.h
131
system_private.h
132
timers.cpp
133
timers.h
134
timing_event.cpp
135
timing_event.h
136
types.h
137
video_presenter.cpp
138
video_presenter.h
139
video_shadergen.cpp
140
video_shadergen.h
141
video_thread.cpp
142
video_thread.h
143
video_thread_commands.h
144
)
145
146
set(RECOMPILER_SRCS
147
cpu_recompiler.cpp
148
cpu_recompiler.h
149
)
150
151
target_precompile_headers(core PRIVATE "pch.h")
152
target_include_directories(core PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/..")
153
target_link_libraries(core PUBLIC Threads::Threads common util)
154
target_link_libraries(core PRIVATE xxhash imgui rapidyaml rcheevos cpuinfo::cpuinfo ZLIB::ZLIB zstd::libzstd_shared libzip::zip speex_resampler_headers)
155
156
if(CPU_ARCH_X64)
157
target_compile_definitions(core PUBLIC "ENABLE_RECOMPILER=1" "ENABLE_MMAP_FASTMEM=1")
158
target_sources(core PRIVATE
159
${RECOMPILER_SRCS}
160
cpu_recompiler_x64.cpp
161
cpu_recompiler_x64.h
162
)
163
target_link_libraries(core PRIVATE xbyak)
164
if(CMAKE_BUILD_TYPE MATCHES "Debug|Devel")
165
target_link_libraries(core PRIVATE zydis)
166
endif()
167
message(STATUS "Building x64 recompiler.")
168
endif()
169
if(CPU_ARCH_ARM32)
170
target_compile_definitions(core PUBLIC "ENABLE_RECOMPILER=1")
171
target_sources(core PRIVATE
172
${RECOMPILER_SRCS}
173
cpu_recompiler_arm32.cpp
174
cpu_recompiler_arm32.h
175
)
176
target_link_libraries(core PUBLIC vixl)
177
message(STATUS "Building ARM32 recompiler.")
178
endif()
179
if(CPU_ARCH_ARM64)
180
target_compile_definitions(core PUBLIC "ENABLE_RECOMPILER=1" "ENABLE_MMAP_FASTMEM=1")
181
target_sources(core PRIVATE
182
${RECOMPILER_SRCS}
183
cpu_recompiler_arm64.cpp
184
cpu_recompiler_arm64.h
185
)
186
target_link_libraries(core PUBLIC vixl)
187
message(STATUS "Building ARM64 recompiler.")
188
endif()
189
if(CPU_ARCH_RISCV64)
190
target_compile_definitions(core PUBLIC "ENABLE_RECOMPILER=1" "ENABLE_MMAP_FASTMEM=1")
191
target_sources(core PRIVATE
192
${RECOMPILER_SRCS}
193
cpu_recompiler_riscv64.cpp
194
cpu_recompiler_riscv64.h
195
)
196
target_link_libraries(core PUBLIC biscuit::biscuit riscv-disas)
197
message(STATUS "Building RISC-V-64 recompiler.")
198
endif()
199
200
function(add_core_resources target)
201
add_util_resources(${target})
202
203
add_resources(${target} "resources" ${CMAKE_SOURCE_DIR}/data/resources)
204
205
if(APPLE)
206
# Copy discord-rpc into the bundle
207
get_target_property(DISCORD_RPC_LIBRARY DiscordRPC::discord-rpc IMPORTED_LOCATION_RELEASE)
208
target_sources(${target} PRIVATE "${DISCORD_RPC_LIBRARY}")
209
set_source_files_properties("${DISCORD_RPC_LIBRARY}" PROPERTIES MACOSX_PACKAGE_LOCATION Frameworks)
210
endif()
211
endfunction()
212
213