mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2024-12-23 13:55:30 +00:00
CMakeLists: Derive the source directory grouping from targets themselves
Removes the need to store to separate SRC and HEADER variables, and then construct the target in most cases.
This commit is contained in:
parent
ee08c39b72
commit
e710a1b989
|
@ -323,12 +323,14 @@ endif()
|
||||||
# This function should be passed a list of all files in a target. It will automatically generate
|
# This function should be passed a list of all files in a target. It will automatically generate
|
||||||
# file groups following the directory hierarchy, so that the layout of the files in IDEs matches the
|
# file groups following the directory hierarchy, so that the layout of the files in IDEs matches the
|
||||||
# one in the filesystem.
|
# one in the filesystem.
|
||||||
function(create_directory_groups)
|
function(create_target_directory_groups target_name)
|
||||||
# Place any files that aren't in the source list in a separate group so that they don't get in
|
# Place any files that aren't in the source list in a separate group so that they don't get in
|
||||||
# the way.
|
# the way.
|
||||||
source_group("Other Files" REGULAR_EXPRESSION ".")
|
source_group("Other Files" REGULAR_EXPRESSION ".")
|
||||||
|
|
||||||
foreach(file_name ${ARGV})
|
get_target_property(target_sources "${target_name}" SOURCES)
|
||||||
|
|
||||||
|
foreach(file_name IN LISTS target_sources)
|
||||||
get_filename_component(dir_name "${file_name}" PATH)
|
get_filename_component(dir_name "${file_name}" PATH)
|
||||||
# Group names use '\' as a separator even though the entire rest of CMake uses '/'...
|
# Group names use '\' as a separator even though the entire rest of CMake uses '/'...
|
||||||
string(REPLACE "/" "\\" group_name "${dir_name}")
|
string(REPLACE "/" "\\" group_name "${dir_name}")
|
||||||
|
|
10
externals/getopt/CMakeLists.txt
vendored
10
externals/getopt/CMakeLists.txt
vendored
|
@ -1,11 +1,9 @@
|
||||||
set(SRCS
|
add_library(getopt
|
||||||
getopt.c
|
getopt.c
|
||||||
)
|
|
||||||
set(HEADERS
|
|
||||||
getopt.h
|
getopt.h
|
||||||
)
|
)
|
||||||
|
|
||||||
|
create_target_directory_groups(getopt)
|
||||||
|
|
||||||
create_directory_groups(${SRCS} ${HEADERS})
|
|
||||||
add_library(getopt ${SRCS} ${HEADERS})
|
|
||||||
target_compile_definitions(getopt PUBLIC STATIC_GETOPT)
|
target_compile_definitions(getopt PUBLIC STATIC_GETOPT)
|
||||||
target_include_directories(getopt INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
|
target_include_directories(getopt INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
9
externals/glad/CMakeLists.txt
vendored
9
externals/glad/CMakeLists.txt
vendored
|
@ -1,13 +1,10 @@
|
||||||
set(SRCS
|
add_library(glad STATIC
|
||||||
src/glad.c
|
src/glad.c
|
||||||
)
|
|
||||||
set(HEADERS
|
|
||||||
include/KHR/khrplatform.h
|
include/KHR/khrplatform.h
|
||||||
include/glad/glad.h
|
include/glad/glad.h
|
||||||
)
|
)
|
||||||
|
|
||||||
create_directory_groups(${SRCS} ${HEADERS})
|
create_target_directory_groups(glad)
|
||||||
add_library(glad STATIC ${SRCS} ${HEADERS})
|
|
||||||
target_include_directories(glad PUBLIC "include/")
|
target_include_directories(glad PUBLIC "include/")
|
||||||
|
|
||||||
if ("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
|
if ("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
|
||||||
|
|
11
externals/inih/CMakeLists.txt
vendored
11
externals/inih/CMakeLists.txt
vendored
|
@ -1,12 +1,9 @@
|
||||||
set(SRCS
|
add_library(inih
|
||||||
inih/ini.c
|
inih/ini.c
|
||||||
inih/cpp/INIReader.cpp
|
|
||||||
)
|
|
||||||
set(HEADERS
|
|
||||||
inih/ini.h
|
inih/ini.h
|
||||||
|
inih/cpp/INIReader.cpp
|
||||||
inih/cpp/INIReader.h
|
inih/cpp/INIReader.h
|
||||||
)
|
)
|
||||||
|
|
||||||
create_directory_groups(${SRCS} ${HEADERS})
|
create_target_directory_groups(inih)
|
||||||
add_library(inih ${SRCS} ${HEADERS})
|
|
||||||
target_include_directories(inih INTERFACE .)
|
target_include_directories(inih INTERFACE .)
|
||||||
|
|
|
@ -24,29 +24,12 @@ if ($ENV{CI})
|
||||||
endif()
|
endif()
|
||||||
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/scm_rev.cpp.in" "${CMAKE_CURRENT_SOURCE_DIR}/scm_rev.cpp" @ONLY)
|
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/scm_rev.cpp.in" "${CMAKE_CURRENT_SOURCE_DIR}/scm_rev.cpp" @ONLY)
|
||||||
|
|
||||||
set(SRCS
|
add_library(common STATIC
|
||||||
break_points.cpp
|
|
||||||
file_util.cpp
|
|
||||||
hash.cpp
|
|
||||||
logging/filter.cpp
|
|
||||||
logging/text_formatter.cpp
|
|
||||||
logging/backend.cpp
|
|
||||||
memory_util.cpp
|
|
||||||
microprofile.cpp
|
|
||||||
misc.cpp
|
|
||||||
param_package.cpp
|
|
||||||
scm_rev.cpp
|
|
||||||
string_util.cpp
|
|
||||||
telemetry.cpp
|
|
||||||
thread.cpp
|
|
||||||
timer.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
set(HEADERS
|
|
||||||
alignment.h
|
alignment.h
|
||||||
assert.h
|
assert.h
|
||||||
bit_field.h
|
bit_field.h
|
||||||
bit_set.h
|
bit_set.h
|
||||||
|
break_points.cpp
|
||||||
break_points.h
|
break_points.h
|
||||||
chunk_file.h
|
chunk_file.h
|
||||||
code_block.h
|
code_block.h
|
||||||
|
@ -54,48 +37,59 @@ set(HEADERS
|
||||||
common_funcs.h
|
common_funcs.h
|
||||||
common_paths.h
|
common_paths.h
|
||||||
common_types.h
|
common_types.h
|
||||||
|
file_util.cpp
|
||||||
file_util.h
|
file_util.h
|
||||||
|
hash.cpp
|
||||||
hash.h
|
hash.h
|
||||||
linear_disk_cache.h
|
linear_disk_cache.h
|
||||||
logging/text_formatter.h
|
logging/backend.cpp
|
||||||
|
logging/backend.h
|
||||||
|
logging/filter.cpp
|
||||||
logging/filter.h
|
logging/filter.h
|
||||||
logging/log.h
|
logging/log.h
|
||||||
logging/backend.h
|
logging/text_formatter.cpp
|
||||||
|
logging/text_formatter.h
|
||||||
math_util.h
|
math_util.h
|
||||||
|
memory_util.cpp
|
||||||
memory_util.h
|
memory_util.h
|
||||||
|
microprofile.cpp
|
||||||
microprofile.h
|
microprofile.h
|
||||||
microprofileui.h
|
microprofileui.h
|
||||||
|
misc.cpp
|
||||||
|
param_package.cpp
|
||||||
param_package.h
|
param_package.h
|
||||||
platform.h
|
platform.h
|
||||||
quaternion.h
|
quaternion.h
|
||||||
|
scm_rev.cpp
|
||||||
scm_rev.h
|
scm_rev.h
|
||||||
scope_exit.h
|
scope_exit.h
|
||||||
|
string_util.cpp
|
||||||
string_util.h
|
string_util.h
|
||||||
swap.h
|
swap.h
|
||||||
synchronized_wrapper.h
|
synchronized_wrapper.h
|
||||||
|
telemetry.cpp
|
||||||
telemetry.h
|
telemetry.h
|
||||||
|
thread.cpp
|
||||||
thread.h
|
thread.h
|
||||||
thread_queue_list.h
|
thread_queue_list.h
|
||||||
threadsafe_queue.h
|
threadsafe_queue.h
|
||||||
|
timer.cpp
|
||||||
timer.h
|
timer.h
|
||||||
vector_math.h
|
vector_math.h
|
||||||
)
|
)
|
||||||
|
|
||||||
if(ARCHITECTURE_x86_64)
|
if(ARCHITECTURE_x86_64)
|
||||||
set(SRCS ${SRCS}
|
target_sources(common
|
||||||
|
PRIVATE
|
||||||
x64/cpu_detect.cpp
|
x64/cpu_detect.cpp
|
||||||
)
|
|
||||||
|
|
||||||
set(HEADERS ${HEADERS}
|
|
||||||
x64/cpu_detect.h
|
x64/cpu_detect.h
|
||||||
x64/xbyak_abi.h
|
x64/xbyak_abi.h
|
||||||
x64/xbyak_util.h
|
x64/xbyak_util.h
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
create_directory_groups(${SRCS} ${HEADERS})
|
create_target_directory_groups(common)
|
||||||
|
|
||||||
add_library(common STATIC ${SRCS} ${HEADERS})
|
|
||||||
target_link_libraries(common PUBLIC Boost::boost microprofile)
|
target_link_libraries(common PUBLIC Boost::boost microprofile)
|
||||||
if (ARCHITECTURE_x86_64)
|
if (ARCHITECTURE_x86_64)
|
||||||
target_link_libraries(common PRIVATE xbyak)
|
target_link_libraries(common PRIVATE xbyak)
|
||||||
|
|
|
@ -1,174 +1,171 @@
|
||||||
set(SRCS
|
add_library(core STATIC
|
||||||
arm/dynarmic/arm_dynarmic.cpp
|
|
||||||
arm/unicorn/arm_unicorn.cpp
|
|
||||||
core.cpp
|
|
||||||
core_timing.cpp
|
|
||||||
file_sys/archive_backend.cpp
|
|
||||||
file_sys/disk_archive.cpp
|
|
||||||
file_sys/ivfc_archive.cpp
|
|
||||||
file_sys/path_parser.cpp
|
|
||||||
file_sys/savedata_archive.cpp
|
|
||||||
file_sys/title_metadata.cpp
|
|
||||||
frontend/emu_window.cpp
|
|
||||||
frontend/framebuffer_layout.cpp
|
|
||||||
gdbstub/gdbstub.cpp
|
|
||||||
hle/config_mem.cpp
|
|
||||||
hle/kernel/address_arbiter.cpp
|
|
||||||
hle/kernel/client_port.cpp
|
|
||||||
hle/kernel/client_session.cpp
|
|
||||||
hle/kernel/condition_variable.cpp
|
|
||||||
hle/kernel/domain.cpp
|
|
||||||
hle/kernel/event.cpp
|
|
||||||
hle/kernel/handle_table.cpp
|
|
||||||
hle/kernel/hle_ipc.cpp
|
|
||||||
hle/kernel/kernel.cpp
|
|
||||||
hle/kernel/memory.cpp
|
|
||||||
hle/kernel/mutex.cpp
|
|
||||||
hle/kernel/object_address_table.cpp
|
|
||||||
hle/kernel/process.cpp
|
|
||||||
hle/kernel/resource_limit.cpp
|
|
||||||
hle/kernel/server_port.cpp
|
|
||||||
hle/kernel/server_session.cpp
|
|
||||||
hle/kernel/shared_memory.cpp
|
|
||||||
hle/kernel/svc.cpp
|
|
||||||
hle/kernel/thread.cpp
|
|
||||||
hle/kernel/timer.cpp
|
|
||||||
hle/kernel/vm_manager.cpp
|
|
||||||
hle/kernel/wait_object.cpp
|
|
||||||
hle/lock.cpp
|
|
||||||
hle/romfs.cpp
|
|
||||||
hle/service/acc/acc.cpp
|
|
||||||
hle/service/acc/acc_u0.cpp
|
|
||||||
hle/service/am/am.cpp
|
|
||||||
hle/service/am/applet_oe.cpp
|
|
||||||
hle/service/aoc/aoc_u.cpp
|
|
||||||
hle/service/apm/apm.cpp
|
|
||||||
hle/service/audio/audio.cpp
|
|
||||||
hle/service/audio/audout_u.cpp
|
|
||||||
hle/service/hid/hid.cpp
|
|
||||||
hle/service/lm/lm.cpp
|
|
||||||
hle/service/nvdrv/devices/nvdisp_disp0.cpp
|
|
||||||
hle/service/nvdrv/devices/nvhost_as_gpu.cpp
|
|
||||||
hle/service/nvdrv/devices/nvmap.cpp
|
|
||||||
hle/service/nvdrv/interface.cpp
|
|
||||||
hle/service/nvdrv/nvdrv.cpp
|
|
||||||
hle/service/pctl/pctl.cpp
|
|
||||||
hle/service/pctl/pctl_a.cpp
|
|
||||||
hle/service/service.cpp
|
|
||||||
hle/service/sm/controller.cpp
|
|
||||||
hle/service/sm/sm.cpp
|
|
||||||
hle/service/time/time.cpp
|
|
||||||
hle/service/vi/vi.cpp
|
|
||||||
hle/service/vi/vi_m.cpp
|
|
||||||
hle/shared_page.cpp
|
|
||||||
hw/hw.cpp
|
|
||||||
hw/lcd.cpp
|
|
||||||
loader/elf.cpp
|
|
||||||
loader/linker.cpp
|
|
||||||
loader/loader.cpp
|
|
||||||
loader/nro.cpp
|
|
||||||
loader/nso.cpp
|
|
||||||
tracer/recorder.cpp
|
|
||||||
memory.cpp
|
|
||||||
perf_stats.cpp
|
|
||||||
settings.cpp
|
|
||||||
telemetry_session.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
set(HEADERS
|
|
||||||
arm/arm_interface.h
|
arm/arm_interface.h
|
||||||
|
arm/dynarmic/arm_dynarmic.cpp
|
||||||
arm/dynarmic/arm_dynarmic.h
|
arm/dynarmic/arm_dynarmic.h
|
||||||
|
arm/unicorn/arm_unicorn.cpp
|
||||||
arm/unicorn/arm_unicorn.h
|
arm/unicorn/arm_unicorn.h
|
||||||
|
core.cpp
|
||||||
core.h
|
core.h
|
||||||
|
core_timing.cpp
|
||||||
core_timing.h
|
core_timing.h
|
||||||
|
file_sys/archive_backend.cpp
|
||||||
file_sys/archive_backend.h
|
file_sys/archive_backend.h
|
||||||
file_sys/directory_backend.h
|
file_sys/directory_backend.h
|
||||||
|
file_sys/disk_archive.cpp
|
||||||
file_sys/disk_archive.h
|
file_sys/disk_archive.h
|
||||||
file_sys/errors.h
|
file_sys/errors.h
|
||||||
file_sys/file_backend.h
|
file_sys/file_backend.h
|
||||||
|
file_sys/ivfc_archive.cpp
|
||||||
file_sys/ivfc_archive.h
|
file_sys/ivfc_archive.h
|
||||||
|
file_sys/path_parser.cpp
|
||||||
file_sys/path_parser.h
|
file_sys/path_parser.h
|
||||||
|
file_sys/savedata_archive.cpp
|
||||||
file_sys/savedata_archive.h
|
file_sys/savedata_archive.h
|
||||||
|
file_sys/title_metadata.cpp
|
||||||
file_sys/title_metadata.h
|
file_sys/title_metadata.h
|
||||||
|
frontend/emu_window.cpp
|
||||||
frontend/emu_window.h
|
frontend/emu_window.h
|
||||||
|
frontend/framebuffer_layout.cpp
|
||||||
frontend/framebuffer_layout.h
|
frontend/framebuffer_layout.h
|
||||||
frontend/input.h
|
frontend/input.h
|
||||||
|
gdbstub/gdbstub.cpp
|
||||||
gdbstub/gdbstub.h
|
gdbstub/gdbstub.h
|
||||||
|
hle/config_mem.cpp
|
||||||
hle/config_mem.h
|
hle/config_mem.h
|
||||||
hle/ipc.h
|
hle/ipc.h
|
||||||
hle/ipc_helpers.h
|
hle/ipc_helpers.h
|
||||||
|
hle/kernel/address_arbiter.cpp
|
||||||
hle/kernel/address_arbiter.h
|
hle/kernel/address_arbiter.h
|
||||||
|
hle/kernel/client_port.cpp
|
||||||
hle/kernel/client_port.h
|
hle/kernel/client_port.h
|
||||||
|
hle/kernel/client_session.cpp
|
||||||
hle/kernel/client_session.h
|
hle/kernel/client_session.h
|
||||||
|
hle/kernel/condition_variable.cpp
|
||||||
hle/kernel/condition_variable.h
|
hle/kernel/condition_variable.h
|
||||||
|
hle/kernel/domain.cpp
|
||||||
hle/kernel/domain.h
|
hle/kernel/domain.h
|
||||||
hle/kernel/errors.h
|
hle/kernel/errors.h
|
||||||
|
hle/kernel/event.cpp
|
||||||
hle/kernel/event.h
|
hle/kernel/event.h
|
||||||
|
hle/kernel/handle_table.cpp
|
||||||
hle/kernel/handle_table.h
|
hle/kernel/handle_table.h
|
||||||
|
hle/kernel/hle_ipc.cpp
|
||||||
hle/kernel/hle_ipc.h
|
hle/kernel/hle_ipc.h
|
||||||
|
hle/kernel/kernel.cpp
|
||||||
hle/kernel/kernel.h
|
hle/kernel/kernel.h
|
||||||
|
hle/kernel/memory.cpp
|
||||||
hle/kernel/memory.h
|
hle/kernel/memory.h
|
||||||
|
hle/kernel/mutex.cpp
|
||||||
hle/kernel/mutex.h
|
hle/kernel/mutex.h
|
||||||
|
hle/kernel/object_address_table.cpp
|
||||||
hle/kernel/object_address_table.h
|
hle/kernel/object_address_table.h
|
||||||
|
hle/kernel/process.cpp
|
||||||
hle/kernel/process.h
|
hle/kernel/process.h
|
||||||
|
hle/kernel/resource_limit.cpp
|
||||||
hle/kernel/resource_limit.h
|
hle/kernel/resource_limit.h
|
||||||
|
hle/kernel/server_port.cpp
|
||||||
hle/kernel/server_port.h
|
hle/kernel/server_port.h
|
||||||
|
hle/kernel/server_session.cpp
|
||||||
hle/kernel/server_session.h
|
hle/kernel/server_session.h
|
||||||
hle/kernel/session.h
|
hle/kernel/session.h
|
||||||
|
hle/kernel/shared_memory.cpp
|
||||||
hle/kernel/shared_memory.h
|
hle/kernel/shared_memory.h
|
||||||
hle/kernel/sync_object.h
|
hle/kernel/svc.cpp
|
||||||
hle/kernel/svc.h
|
hle/kernel/svc.h
|
||||||
hle/kernel/svc_wrap.h
|
hle/kernel/svc_wrap.h
|
||||||
|
hle/kernel/sync_object.h
|
||||||
|
hle/kernel/thread.cpp
|
||||||
hle/kernel/thread.h
|
hle/kernel/thread.h
|
||||||
|
hle/kernel/timer.cpp
|
||||||
hle/kernel/timer.h
|
hle/kernel/timer.h
|
||||||
|
hle/kernel/vm_manager.cpp
|
||||||
hle/kernel/vm_manager.h
|
hle/kernel/vm_manager.h
|
||||||
|
hle/kernel/wait_object.cpp
|
||||||
hle/kernel/wait_object.h
|
hle/kernel/wait_object.h
|
||||||
|
hle/lock.cpp
|
||||||
hle/lock.h
|
hle/lock.h
|
||||||
hle/result.h
|
hle/result.h
|
||||||
|
hle/romfs.cpp
|
||||||
hle/romfs.h
|
hle/romfs.h
|
||||||
|
hle/service/acc/acc.cpp
|
||||||
hle/service/acc/acc.h
|
hle/service/acc/acc.h
|
||||||
|
hle/service/acc/acc_u0.cpp
|
||||||
hle/service/acc/acc_u0.h
|
hle/service/acc/acc_u0.h
|
||||||
|
hle/service/am/am.cpp
|
||||||
hle/service/am/am.h
|
hle/service/am/am.h
|
||||||
|
hle/service/am/applet_oe.cpp
|
||||||
hle/service/am/applet_oe.h
|
hle/service/am/applet_oe.h
|
||||||
|
hle/service/aoc/aoc_u.cpp
|
||||||
hle/service/aoc/aoc_u.h
|
hle/service/aoc/aoc_u.h
|
||||||
|
hle/service/apm/apm.cpp
|
||||||
hle/service/apm/apm.h
|
hle/service/apm/apm.h
|
||||||
|
hle/service/audio/audio.cpp
|
||||||
hle/service/audio/audio.h
|
hle/service/audio/audio.h
|
||||||
|
hle/service/audio/audout_u.cpp
|
||||||
hle/service/audio/audout_u.h
|
hle/service/audio/audout_u.h
|
||||||
|
hle/service/hid/hid.cpp
|
||||||
hle/service/hid/hid.h
|
hle/service/hid/hid.h
|
||||||
|
hle/service/lm/lm.cpp
|
||||||
hle/service/lm/lm.h
|
hle/service/lm/lm.h
|
||||||
hle/service/nvdrv/devices/nvdevice.h
|
hle/service/nvdrv/devices/nvdevice.h
|
||||||
|
hle/service/nvdrv/devices/nvdisp_disp0.cpp
|
||||||
hle/service/nvdrv/devices/nvdisp_disp0.h
|
hle/service/nvdrv/devices/nvdisp_disp0.h
|
||||||
|
hle/service/nvdrv/devices/nvhost_as_gpu.cpp
|
||||||
hle/service/nvdrv/devices/nvhost_as_gpu.h
|
hle/service/nvdrv/devices/nvhost_as_gpu.h
|
||||||
|
hle/service/nvdrv/devices/nvmap.cpp
|
||||||
hle/service/nvdrv/devices/nvmap.h
|
hle/service/nvdrv/devices/nvmap.h
|
||||||
|
hle/service/nvdrv/interface.cpp
|
||||||
hle/service/nvdrv/interface.h
|
hle/service/nvdrv/interface.h
|
||||||
|
hle/service/nvdrv/nvdrv.cpp
|
||||||
hle/service/nvdrv/nvdrv.h
|
hle/service/nvdrv/nvdrv.h
|
||||||
|
hle/service/pctl/pctl.cpp
|
||||||
hle/service/pctl/pctl.h
|
hle/service/pctl/pctl.h
|
||||||
|
hle/service/pctl/pctl_a.cpp
|
||||||
hle/service/pctl/pctl_a.h
|
hle/service/pctl/pctl_a.h
|
||||||
|
hle/service/service.cpp
|
||||||
hle/service/service.h
|
hle/service/service.h
|
||||||
|
hle/service/sm/controller.cpp
|
||||||
hle/service/sm/controller.h
|
hle/service/sm/controller.h
|
||||||
|
hle/service/sm/sm.cpp
|
||||||
hle/service/sm/sm.h
|
hle/service/sm/sm.h
|
||||||
|
hle/service/time/time.cpp
|
||||||
hle/service/time/time.h
|
hle/service/time/time.h
|
||||||
|
hle/service/vi/vi.cpp
|
||||||
hle/service/vi/vi.h
|
hle/service/vi/vi.h
|
||||||
|
hle/service/vi/vi_m.cpp
|
||||||
hle/service/vi/vi_m.h
|
hle/service/vi/vi_m.h
|
||||||
|
hle/shared_page.cpp
|
||||||
hle/shared_page.h
|
hle/shared_page.h
|
||||||
|
hw/hw.cpp
|
||||||
hw/hw.h
|
hw/hw.h
|
||||||
|
hw/lcd.cpp
|
||||||
hw/lcd.h
|
hw/lcd.h
|
||||||
|
loader/elf.cpp
|
||||||
loader/elf.h
|
loader/elf.h
|
||||||
|
loader/linker.cpp
|
||||||
loader/linker.h
|
loader/linker.h
|
||||||
|
loader/loader.cpp
|
||||||
loader/loader.h
|
loader/loader.h
|
||||||
|
loader/nro.cpp
|
||||||
loader/nro.h
|
loader/nro.h
|
||||||
|
loader/nso.cpp
|
||||||
loader/nso.h
|
loader/nso.h
|
||||||
tracer/recorder.h
|
memory.cpp
|
||||||
tracer/citrace.h
|
|
||||||
memory.h
|
memory.h
|
||||||
memory_setup.h
|
memory_setup.h
|
||||||
mmio.h
|
mmio.h
|
||||||
|
perf_stats.cpp
|
||||||
perf_stats.h
|
perf_stats.h
|
||||||
|
settings.cpp
|
||||||
settings.h
|
settings.h
|
||||||
|
telemetry_session.cpp
|
||||||
telemetry_session.h
|
telemetry_session.h
|
||||||
)
|
tracer/citrace.h
|
||||||
|
tracer/recorder.cpp
|
||||||
|
tracer/recorder.h
|
||||||
|
)
|
||||||
|
|
||||||
|
create_target_directory_groups(core)
|
||||||
|
|
||||||
create_directory_groups(${SRCS} ${HEADERS})
|
|
||||||
add_library(core STATIC ${SRCS} ${HEADERS})
|
|
||||||
target_link_libraries(core PUBLIC common PRIVATE dynarmic video_core)
|
target_link_libraries(core PUBLIC common PRIVATE dynarmic video_core)
|
||||||
target_link_libraries(core PUBLIC Boost::boost PRIVATE fmt lz4_static unicorn)
|
target_link_libraries(core PUBLIC Boost::boost PRIVATE fmt lz4_static unicorn)
|
||||||
|
|
|
@ -1,25 +1,18 @@
|
||||||
set(SRCS
|
add_library(input_common STATIC
|
||||||
analog_from_button.cpp
|
analog_from_button.cpp
|
||||||
keyboard.cpp
|
|
||||||
main.cpp
|
|
||||||
motion_emu.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
set(HEADERS
|
|
||||||
analog_from_button.h
|
analog_from_button.h
|
||||||
|
keyboard.cpp
|
||||||
keyboard.h
|
keyboard.h
|
||||||
|
main.cpp
|
||||||
main.h
|
main.h
|
||||||
|
motion_emu.cpp
|
||||||
motion_emu.h
|
motion_emu.h
|
||||||
)
|
|
||||||
|
|
||||||
if(SDL2_FOUND)
|
$<$<BOOL:${SDL2_FOUND}>:sdl/sdl.cpp sdl/sdl.h>
|
||||||
set(SRCS ${SRCS} sdl/sdl.cpp)
|
)
|
||||||
set(HEADERS ${HEADERS} sdl/sdl.h)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
create_directory_groups(${SRCS} ${HEADERS})
|
create_target_directory_groups(input_common)
|
||||||
|
|
||||||
add_library(input_common STATIC ${SRCS} ${HEADERS})
|
|
||||||
target_link_libraries(input_common PUBLIC core PRIVATE common)
|
target_link_libraries(input_common PUBLIC core PRIVATE common)
|
||||||
|
|
||||||
if(SDL2_FOUND)
|
if(SDL2_FOUND)
|
||||||
|
|
|
@ -1,20 +1,16 @@
|
||||||
set(SRCS
|
add_executable(tests
|
||||||
common/param_package.cpp
|
common/param_package.cpp
|
||||||
core/arm/arm_test_common.cpp
|
core/arm/arm_test_common.cpp
|
||||||
|
core/arm/arm_test_common.h
|
||||||
core/core_timing.cpp
|
core/core_timing.cpp
|
||||||
core/file_sys/path_parser.cpp
|
core/file_sys/path_parser.cpp
|
||||||
core/memory/memory.cpp
|
core/memory/memory.cpp
|
||||||
glad.cpp
|
glad.cpp
|
||||||
tests.cpp
|
tests.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
set(HEADERS
|
create_target_directory_groups(tests)
|
||||||
core/arm/arm_test_common.h
|
|
||||||
)
|
|
||||||
|
|
||||||
create_directory_groups(${SRCS} ${HEADERS})
|
|
||||||
|
|
||||||
add_executable(tests ${SRCS} ${HEADERS})
|
|
||||||
target_link_libraries(tests PRIVATE common core)
|
target_link_libraries(tests PRIVATE common core)
|
||||||
target_link_libraries(tests PRIVATE glad) # To support linker work-around
|
target_link_libraries(tests PRIVATE glad) # To support linker work-around
|
||||||
target_link_libraries(tests PRIVATE ${PLATFORM_LIBRARIES} catch-single-include Threads::Threads)
|
target_link_libraries(tests PRIVATE ${PLATFORM_LIBRARIES} catch-single-include Threads::Threads)
|
||||||
|
|
|
@ -1,23 +1,19 @@
|
||||||
set(SRCS
|
add_library(video_core STATIC
|
||||||
renderer_base.cpp
|
renderer_base.cpp
|
||||||
renderer_opengl/gl_shader_util.cpp
|
|
||||||
renderer_opengl/gl_state.cpp
|
|
||||||
renderer_opengl/renderer_opengl.cpp
|
|
||||||
video_core.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
set(HEADERS
|
|
||||||
renderer_base.h
|
renderer_base.h
|
||||||
renderer_opengl/gl_resource_manager.h
|
renderer_opengl/gl_resource_manager.h
|
||||||
|
renderer_opengl/gl_shader_util.cpp
|
||||||
renderer_opengl/gl_shader_util.h
|
renderer_opengl/gl_shader_util.h
|
||||||
|
renderer_opengl/gl_state.cpp
|
||||||
renderer_opengl/gl_state.h
|
renderer_opengl/gl_state.h
|
||||||
|
renderer_opengl/renderer_opengl.cpp
|
||||||
renderer_opengl/renderer_opengl.h
|
renderer_opengl/renderer_opengl.h
|
||||||
utils.h
|
utils.h
|
||||||
|
video_core.cpp
|
||||||
video_core.h
|
video_core.h
|
||||||
)
|
)
|
||||||
|
|
||||||
create_directory_groups(${SRCS} ${HEADERS})
|
create_target_directory_groups(video_core)
|
||||||
|
|
||||||
add_library(video_core STATIC ${SRCS} ${HEADERS})
|
|
||||||
target_link_libraries(video_core PUBLIC common core)
|
target_link_libraries(video_core PUBLIC common core)
|
||||||
target_link_libraries(video_core PRIVATE glad)
|
target_link_libraries(video_core PRIVATE glad)
|
||||||
|
|
|
@ -3,50 +3,47 @@ set(CMAKE_AUTORCC ON)
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/CMakeModules)
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/CMakeModules)
|
||||||
|
|
||||||
set(SRCS
|
add_executable(yuzu
|
||||||
about_dialog.cpp
|
|
||||||
configuration/config.cpp
|
|
||||||
configuration/configure_debug.cpp
|
|
||||||
configuration/configure_dialog.cpp
|
|
||||||
configuration/configure_general.cpp
|
|
||||||
configuration/configure_graphics.cpp
|
|
||||||
configuration/configure_input.cpp
|
|
||||||
configuration/configure_system.cpp
|
|
||||||
debugger/profiler.cpp
|
|
||||||
debugger/registers.cpp
|
|
||||||
debugger/wait_tree.cpp
|
|
||||||
util/spinbox.cpp
|
|
||||||
util/util.cpp
|
|
||||||
bootmanager.cpp
|
|
||||||
game_list.cpp
|
|
||||||
hotkeys.cpp
|
|
||||||
main.cpp
|
|
||||||
ui_settings.cpp
|
|
||||||
yuzu.rc
|
|
||||||
Info.plist
|
Info.plist
|
||||||
)
|
about_dialog.cpp
|
||||||
|
|
||||||
set(HEADERS
|
|
||||||
about_dialog.h
|
about_dialog.h
|
||||||
configuration/config.h
|
bootmanager.cpp
|
||||||
configuration/configure_debug.h
|
|
||||||
configuration/configure_dialog.h
|
|
||||||
configuration/configure_general.h
|
|
||||||
configuration/configure_graphics.h
|
|
||||||
configuration/configure_input.h
|
|
||||||
configuration/configure_system.h
|
|
||||||
debugger/profiler.h
|
|
||||||
debugger/registers.h
|
|
||||||
debugger/wait_tree.h
|
|
||||||
util/spinbox.h
|
|
||||||
util/util.h
|
|
||||||
bootmanager.h
|
bootmanager.h
|
||||||
|
configuration/config.cpp
|
||||||
|
configuration/config.h
|
||||||
|
configuration/configure_debug.cpp
|
||||||
|
configuration/configure_debug.h
|
||||||
|
configuration/configure_dialog.cpp
|
||||||
|
configuration/configure_dialog.h
|
||||||
|
configuration/configure_general.cpp
|
||||||
|
configuration/configure_general.h
|
||||||
|
configuration/configure_graphics.cpp
|
||||||
|
configuration/configure_graphics.h
|
||||||
|
configuration/configure_input.cpp
|
||||||
|
configuration/configure_input.h
|
||||||
|
configuration/configure_system.cpp
|
||||||
|
configuration/configure_system.h
|
||||||
|
debugger/profiler.cpp
|
||||||
|
debugger/profiler.h
|
||||||
|
debugger/registers.cpp
|
||||||
|
debugger/registers.h
|
||||||
|
debugger/wait_tree.cpp
|
||||||
|
debugger/wait_tree.h
|
||||||
|
game_list.cpp
|
||||||
game_list.h
|
game_list.h
|
||||||
game_list_p.h
|
game_list_p.h
|
||||||
|
hotkeys.cpp
|
||||||
hotkeys.h
|
hotkeys.h
|
||||||
|
main.cpp
|
||||||
main.h
|
main.h
|
||||||
|
ui_settings.cpp
|
||||||
ui_settings.h
|
ui_settings.h
|
||||||
)
|
util/spinbox.cpp
|
||||||
|
util/spinbox.h
|
||||||
|
util/util.cpp
|
||||||
|
util/util.h
|
||||||
|
yuzu.rc
|
||||||
|
)
|
||||||
|
|
||||||
set(UIS
|
set(UIS
|
||||||
aboutdialog.ui
|
aboutdialog.ui
|
||||||
|
@ -59,23 +56,31 @@ set(UIS
|
||||||
debugger/registers.ui
|
debugger/registers.ui
|
||||||
hotkeys.ui
|
hotkeys.ui
|
||||||
main.ui
|
main.ui
|
||||||
)
|
)
|
||||||
|
|
||||||
file(GLOB_RECURSE ICONS ${CMAKE_SOURCE_DIR}/dist/icons/*)
|
file(GLOB_RECURSE ICONS ${CMAKE_SOURCE_DIR}/dist/icons/*)
|
||||||
file(GLOB_RECURSE THEMES ${CMAKE_SOURCE_DIR}/dist/qt_themes/*)
|
file(GLOB_RECURSE THEMES ${CMAKE_SOURCE_DIR}/dist/qt_themes/*)
|
||||||
|
|
||||||
create_directory_groups(${SRCS} ${HEADERS} ${UIS})
|
|
||||||
|
|
||||||
qt5_wrap_ui(UI_HDRS ${UIS})
|
qt5_wrap_ui(UI_HDRS ${UIS})
|
||||||
|
|
||||||
|
target_sources(yuzu
|
||||||
|
PRIVATE
|
||||||
|
${ICONS}
|
||||||
|
${THEMES}
|
||||||
|
${UI_HDRS}
|
||||||
|
${UIS}
|
||||||
|
)
|
||||||
|
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
set(MACOSX_ICON "../../dist/yuzu.icns")
|
set(MACOSX_ICON "../../dist/yuzu.icns")
|
||||||
set_source_files_properties(${MACOSX_ICON} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
|
set_source_files_properties(${MACOSX_ICON} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
|
||||||
add_executable(yuzu MACOSX_BUNDLE ${SRCS} ${HEADERS} ${UI_HDRS} ${MACOSX_ICON} ${ICONS})
|
target_sources(yuzu PRIVATE ${MACOSX_ICON})
|
||||||
|
set_target_properties(yuzu PROPERTIES MACOSX_BUNDLE TRUE)
|
||||||
set_target_properties(yuzu PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
|
set_target_properties(yuzu PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
|
||||||
else()
|
|
||||||
add_executable(yuzu ${SRCS} ${HEADERS} ${UI_HDRS} ${ICONS})
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
create_target_directory_groups(yuzu)
|
||||||
|
|
||||||
target_link_libraries(yuzu PRIVATE common core input_common video_core)
|
target_link_libraries(yuzu PRIVATE common core input_common video_core)
|
||||||
target_link_libraries(yuzu PRIVATE Boost::boost glad Qt5::OpenGL Qt5::Widgets)
|
target_link_libraries(yuzu PRIVATE Boost::boost glad Qt5::OpenGL Qt5::Widgets)
|
||||||
target_link_libraries(yuzu PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads)
|
target_link_libraries(yuzu PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads)
|
||||||
|
|
|
@ -1,21 +1,18 @@
|
||||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/CMakeModules)
|
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/CMakeModules)
|
||||||
|
|
||||||
set(SRCS
|
add_executable(yuzu-cmd
|
||||||
emu_window/emu_window_sdl2.cpp
|
|
||||||
config.cpp
|
config.cpp
|
||||||
yuzu.cpp
|
|
||||||
yuzu.rc
|
|
||||||
)
|
|
||||||
set(HEADERS
|
|
||||||
emu_window/emu_window_sdl2.h
|
|
||||||
config.h
|
config.h
|
||||||
default_ini.h
|
default_ini.h
|
||||||
|
emu_window/emu_window_sdl2.cpp
|
||||||
|
emu_window/emu_window_sdl2.h
|
||||||
resource.h
|
resource.h
|
||||||
)
|
yuzu.cpp
|
||||||
|
yuzu.rc
|
||||||
|
)
|
||||||
|
|
||||||
create_directory_groups(${SRCS} ${HEADERS})
|
create_target_directory_groups(yuzu-cmd)
|
||||||
|
|
||||||
add_executable(yuzu-cmd ${SRCS} ${HEADERS})
|
|
||||||
target_link_libraries(yuzu-cmd PRIVATE common core input_common)
|
target_link_libraries(yuzu-cmd PRIVATE common core input_common)
|
||||||
target_link_libraries(yuzu-cmd PRIVATE inih glad)
|
target_link_libraries(yuzu-cmd PRIVATE inih glad)
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
|
|
Loading…
Reference in a new issue