diff options
| author | 2018-01-17 19:37:34 -0500 | |
|---|---|---|
| committer | 2018-01-17 21:51:43 -0500 | |
| commit | e710a1b9894d835d740ed63c03098fd637f61f63 (patch) | |
| tree | 7585a15cdf38ea2913a847c738c84e769e43ea77 | |
| parent | Merge pull request #73 from N00byKing/3093 (diff) | |
| download | yuzu-e710a1b9894d835d740ed63c03098fd637f61f63.tar.gz yuzu-e710a1b9894d835d740ed63c03098fd637f61f63.tar.xz yuzu-e710a1b9894d835d740ed63c03098fd637f61f63.zip | |
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.
| -rw-r--r-- | CMakeLists.txt | 6 | ||||
| -rw-r--r-- | externals/getopt/CMakeLists.txt | 14 | ||||
| -rw-r--r-- | externals/glad/CMakeLists.txt | 15 | ||||
| -rw-r--r-- | externals/inih/CMakeLists.txt | 17 | ||||
| -rw-r--r-- | src/common/CMakeLists.txt | 120 | ||||
| -rw-r--r-- | src/core/CMakeLists.txt | 337 | ||||
| -rw-r--r-- | src/input_common/CMakeLists.txt | 31 | ||||
| -rw-r--r-- | src/tests/CMakeLists.txt | 26 | ||||
| -rw-r--r-- | src/video_core/CMakeLists.txt | 34 | ||||
| -rw-r--r-- | src/yuzu/CMakeLists.txt | 125 | ||||
| -rw-r--r-- | src/yuzu_cmd/CMakeLists.txt | 25 |
11 files changed, 361 insertions, 389 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index d814bb74f..aa2154cb1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
| @@ -323,12 +323,14 @@ endif() | |||
| 323 | # This function should be passed a list of all files in a target. It will automatically generate | 323 | # This function should be passed a list of all files in a target. It will automatically generate |
| 324 | # file groups following the directory hierarchy, so that the layout of the files in IDEs matches the | 324 | # file groups following the directory hierarchy, so that the layout of the files in IDEs matches the |
| 325 | # one in the filesystem. | 325 | # one in the filesystem. |
| 326 | function(create_directory_groups) | 326 | function(create_target_directory_groups target_name) |
| 327 | # Place any files that aren't in the source list in a separate group so that they don't get in | 327 | # Place any files that aren't in the source list in a separate group so that they don't get in |
| 328 | # the way. | 328 | # the way. |
| 329 | source_group("Other Files" REGULAR_EXPRESSION ".") | 329 | source_group("Other Files" REGULAR_EXPRESSION ".") |
| 330 | 330 | ||
| 331 | foreach(file_name ${ARGV}) | 331 | get_target_property(target_sources "${target_name}" SOURCES) |
| 332 | |||
| 333 | foreach(file_name IN LISTS target_sources) | ||
| 332 | get_filename_component(dir_name "${file_name}" PATH) | 334 | get_filename_component(dir_name "${file_name}" PATH) |
| 333 | # Group names use '\' as a separator even though the entire rest of CMake uses '/'... | 335 | # Group names use '\' as a separator even though the entire rest of CMake uses '/'... |
| 334 | string(REPLACE "/" "\\" group_name "${dir_name}") | 336 | string(REPLACE "/" "\\" group_name "${dir_name}") |
diff --git a/externals/getopt/CMakeLists.txt b/externals/getopt/CMakeLists.txt index c8b745d55..ad7a2b363 100644 --- a/externals/getopt/CMakeLists.txt +++ b/externals/getopt/CMakeLists.txt | |||
| @@ -1,11 +1,9 @@ | |||
| 1 | set(SRCS | 1 | add_library(getopt |
| 2 | getopt.c | 2 | getopt.c |
| 3 | ) | 3 | getopt.h |
| 4 | set(HEADERS | 4 | ) |
| 5 | getopt.h | 5 | |
| 6 | ) | 6 | create_target_directory_groups(getopt) |
| 7 | 7 | ||
| 8 | create_directory_groups(${SRCS} ${HEADERS}) | ||
| 9 | add_library(getopt ${SRCS} ${HEADERS}) | ||
| 10 | target_compile_definitions(getopt PUBLIC STATIC_GETOPT) | 8 | target_compile_definitions(getopt PUBLIC STATIC_GETOPT) |
| 11 | target_include_directories(getopt INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) | 9 | target_include_directories(getopt INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) |
diff --git a/externals/glad/CMakeLists.txt b/externals/glad/CMakeLists.txt index 6d35a844b..c43ae475a 100644 --- a/externals/glad/CMakeLists.txt +++ b/externals/glad/CMakeLists.txt | |||
| @@ -1,13 +1,10 @@ | |||
| 1 | set(SRCS | 1 | add_library(glad STATIC |
| 2 | src/glad.c | 2 | src/glad.c |
| 3 | ) | 3 | include/KHR/khrplatform.h |
| 4 | set(HEADERS | 4 | include/glad/glad.h |
| 5 | include/KHR/khrplatform.h | 5 | ) |
| 6 | include/glad/glad.h | ||
| 7 | ) | ||
| 8 | 6 | ||
| 9 | create_directory_groups(${SRCS} ${HEADERS}) | 7 | create_target_directory_groups(glad) |
| 10 | add_library(glad STATIC ${SRCS} ${HEADERS}) | ||
| 11 | target_include_directories(glad PUBLIC "include/") | 8 | target_include_directories(glad PUBLIC "include/") |
| 12 | 9 | ||
| 13 | if ("${CMAKE_SYSTEM_NAME}" MATCHES "Linux") | 10 | if ("${CMAKE_SYSTEM_NAME}" MATCHES "Linux") |
diff --git a/externals/inih/CMakeLists.txt b/externals/inih/CMakeLists.txt index cff36a581..2a75852c2 100644 --- a/externals/inih/CMakeLists.txt +++ b/externals/inih/CMakeLists.txt | |||
| @@ -1,12 +1,9 @@ | |||
| 1 | set(SRCS | 1 | add_library(inih |
| 2 | inih/ini.c | 2 | inih/ini.c |
| 3 | inih/cpp/INIReader.cpp | 3 | inih/ini.h |
| 4 | ) | 4 | inih/cpp/INIReader.cpp |
| 5 | set(HEADERS | 5 | inih/cpp/INIReader.h |
| 6 | inih/ini.h | 6 | ) |
| 7 | inih/cpp/INIReader.h | ||
| 8 | ) | ||
| 9 | 7 | ||
| 10 | create_directory_groups(${SRCS} ${HEADERS}) | 8 | create_target_directory_groups(inih) |
| 11 | add_library(inih ${SRCS} ${HEADERS}) | ||
| 12 | target_include_directories(inih INTERFACE .) | 9 | target_include_directories(inih INTERFACE .) |
diff --git a/src/common/CMakeLists.txt b/src/common/CMakeLists.txt index 26cf9480b..1af80769a 100644 --- a/src/common/CMakeLists.txt +++ b/src/common/CMakeLists.txt | |||
| @@ -24,78 +24,72 @@ if ($ENV{CI}) | |||
| 24 | endif() | 24 | endif() |
| 25 | configure_file("${CMAKE_CURRENT_SOURCE_DIR}/scm_rev.cpp.in" "${CMAKE_CURRENT_SOURCE_DIR}/scm_rev.cpp" @ONLY) | 25 | configure_file("${CMAKE_CURRENT_SOURCE_DIR}/scm_rev.cpp.in" "${CMAKE_CURRENT_SOURCE_DIR}/scm_rev.cpp" @ONLY) |
| 26 | 26 | ||
| 27 | set(SRCS | 27 | add_library(common STATIC |
| 28 | break_points.cpp | 28 | alignment.h |
| 29 | file_util.cpp | 29 | assert.h |
| 30 | hash.cpp | 30 | bit_field.h |
| 31 | logging/filter.cpp | 31 | bit_set.h |
| 32 | logging/text_formatter.cpp | 32 | break_points.cpp |
| 33 | logging/backend.cpp | 33 | break_points.h |
| 34 | memory_util.cpp | 34 | chunk_file.h |
| 35 | microprofile.cpp | 35 | code_block.h |
| 36 | misc.cpp | 36 | color.h |
| 37 | param_package.cpp | 37 | common_funcs.h |
| 38 | scm_rev.cpp | 38 | common_paths.h |
| 39 | string_util.cpp | 39 | common_types.h |
| 40 | telemetry.cpp | 40 | file_util.cpp |
| 41 | thread.cpp | 41 | file_util.h |
| 42 | timer.cpp | 42 | hash.cpp |
| 43 | ) | 43 | hash.h |
| 44 | 44 | linear_disk_cache.h | |
| 45 | set(HEADERS | 45 | logging/backend.cpp |
| 46 | alignment.h | 46 | logging/backend.h |
| 47 | assert.h | 47 | logging/filter.cpp |
| 48 | bit_field.h | 48 | logging/filter.h |
| 49 | bit_set.h | 49 | logging/log.h |
| 50 | break_points.h | 50 | logging/text_formatter.cpp |
| 51 | chunk_file.h | 51 | logging/text_formatter.h |
| 52 | code_block.h | 52 | math_util.h |
| 53 | color.h | 53 | memory_util.cpp |
| 54 | common_funcs.h | 54 | memory_util.h |
| 55 | common_paths.h | 55 | microprofile.cpp |
| 56 | common_types.h | 56 | microprofile.h |
| 57 | file_util.h | 57 | microprofileui.h |
| 58 | hash.h | 58 | misc.cpp |
| 59 | linear_disk_cache.h | 59 | param_package.cpp |
| 60 | logging/text_formatter.h | 60 | param_package.h |
| 61 | logging/filter.h | 61 | platform.h |
| 62 | logging/log.h | 62 | quaternion.h |
| 63 | logging/backend.h | 63 | scm_rev.cpp |
| 64 | math_util.h | 64 | scm_rev.h |
| 65 | memory_util.h | 65 | scope_exit.h |
| 66 | microprofile.h | 66 | string_util.cpp |
| 67 | microprofileui.h | 67 | string_util.h |
| 68 | param_package.h | 68 | swap.h |
| 69 | platform.h | 69 | synchronized_wrapper.h |
| 70 | quaternion.h | 70 | telemetry.cpp |
| 71 | scm_rev.h | 71 | telemetry.h |
| 72 | scope_exit.h | 72 | thread.cpp |
| 73 | string_util.h | 73 | thread.h |
| 74 | swap.h | 74 | thread_queue_list.h |
| 75 | synchronized_wrapper.h | 75 | threadsafe_queue.h |
| 76 | telemetry.h | 76 | timer.cpp |
| 77 | thread.h | 77 | timer.h |
| 78 | thread_queue_list.h | 78 | vector_math.h |
| 79 | threadsafe_queue.h | 79 | ) |
| 80 | timer.h | ||
| 81 | vector_math.h | ||
| 82 | ) | ||
| 83 | 80 | ||
| 84 | if(ARCHITECTURE_x86_64) | 81 | if(ARCHITECTURE_x86_64) |
| 85 | set(SRCS ${SRCS} | 82 | target_sources(common |
| 83 | PRIVATE | ||
| 86 | x64/cpu_detect.cpp | 84 | x64/cpu_detect.cpp |
| 87 | ) | ||
| 88 | |||
| 89 | set(HEADERS ${HEADERS} | ||
| 90 | x64/cpu_detect.h | 85 | x64/cpu_detect.h |
| 91 | x64/xbyak_abi.h | 86 | x64/xbyak_abi.h |
| 92 | x64/xbyak_util.h | 87 | x64/xbyak_util.h |
| 93 | ) | 88 | ) |
| 94 | endif() | 89 | endif() |
| 95 | 90 | ||
| 96 | create_directory_groups(${SRCS} ${HEADERS}) | 91 | create_target_directory_groups(common) |
| 97 | 92 | ||
| 98 | add_library(common STATIC ${SRCS} ${HEADERS}) | ||
| 99 | target_link_libraries(common PUBLIC Boost::boost microprofile) | 93 | target_link_libraries(common PUBLIC Boost::boost microprofile) |
| 100 | if (ARCHITECTURE_x86_64) | 94 | if (ARCHITECTURE_x86_64) |
| 101 | target_link_libraries(common PRIVATE xbyak) | 95 | target_link_libraries(common PRIVATE xbyak) |
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index e77261dc4..c05244b7e 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt | |||
| @@ -1,174 +1,171 @@ | |||
| 1 | set(SRCS | 1 | add_library(core STATIC |
| 2 | arm/dynarmic/arm_dynarmic.cpp | 2 | arm/arm_interface.h |
| 3 | arm/unicorn/arm_unicorn.cpp | 3 | arm/dynarmic/arm_dynarmic.cpp |
| 4 | core.cpp | 4 | arm/dynarmic/arm_dynarmic.h |
| 5 | core_timing.cpp | 5 | arm/unicorn/arm_unicorn.cpp |
| 6 | file_sys/archive_backend.cpp | 6 | arm/unicorn/arm_unicorn.h |
| 7 | file_sys/disk_archive.cpp | 7 | core.cpp |
| 8 | file_sys/ivfc_archive.cpp | 8 | core.h |
| 9 | file_sys/path_parser.cpp | 9 | core_timing.cpp |
| 10 | file_sys/savedata_archive.cpp | 10 | core_timing.h |
| 11 | file_sys/title_metadata.cpp | 11 | file_sys/archive_backend.cpp |
| 12 | frontend/emu_window.cpp | 12 | file_sys/archive_backend.h |
| 13 | frontend/framebuffer_layout.cpp | 13 | file_sys/directory_backend.h |
| 14 | gdbstub/gdbstub.cpp | 14 | file_sys/disk_archive.cpp |
| 15 | hle/config_mem.cpp | 15 | file_sys/disk_archive.h |
| 16 | hle/kernel/address_arbiter.cpp | 16 | file_sys/errors.h |
| 17 | hle/kernel/client_port.cpp | 17 | file_sys/file_backend.h |
| 18 | hle/kernel/client_session.cpp | 18 | file_sys/ivfc_archive.cpp |
| 19 | hle/kernel/condition_variable.cpp | 19 | file_sys/ivfc_archive.h |
| 20 | hle/kernel/domain.cpp | 20 | file_sys/path_parser.cpp |
| 21 | hle/kernel/event.cpp | 21 | file_sys/path_parser.h |
| 22 | hle/kernel/handle_table.cpp | 22 | file_sys/savedata_archive.cpp |
| 23 | hle/kernel/hle_ipc.cpp | 23 | file_sys/savedata_archive.h |
| 24 | hle/kernel/kernel.cpp | 24 | file_sys/title_metadata.cpp |
| 25 | hle/kernel/memory.cpp | 25 | file_sys/title_metadata.h |
| 26 | hle/kernel/mutex.cpp | 26 | frontend/emu_window.cpp |
| 27 | hle/kernel/object_address_table.cpp | 27 | frontend/emu_window.h |
| 28 | hle/kernel/process.cpp | 28 | frontend/framebuffer_layout.cpp |
| 29 | hle/kernel/resource_limit.cpp | 29 | frontend/framebuffer_layout.h |
| 30 | hle/kernel/server_port.cpp | 30 | frontend/input.h |
| 31 | hle/kernel/server_session.cpp | 31 | gdbstub/gdbstub.cpp |
| 32 | hle/kernel/shared_memory.cpp | 32 | gdbstub/gdbstub.h |
| 33 | hle/kernel/svc.cpp | 33 | hle/config_mem.cpp |
| 34 | hle/kernel/thread.cpp | 34 | hle/config_mem.h |
| 35 | hle/kernel/timer.cpp | 35 | hle/ipc.h |
| 36 | hle/kernel/vm_manager.cpp | 36 | hle/ipc_helpers.h |
| 37 | hle/kernel/wait_object.cpp | 37 | hle/kernel/address_arbiter.cpp |
| 38 | hle/lock.cpp | 38 | hle/kernel/address_arbiter.h |
| 39 | hle/romfs.cpp | 39 | hle/kernel/client_port.cpp |
| 40 | hle/service/acc/acc.cpp | 40 | hle/kernel/client_port.h |
| 41 | hle/service/acc/acc_u0.cpp | 41 | hle/kernel/client_session.cpp |
| 42 | hle/service/am/am.cpp | 42 | hle/kernel/client_session.h |
| 43 | hle/service/am/applet_oe.cpp | 43 | hle/kernel/condition_variable.cpp |
| 44 | hle/service/aoc/aoc_u.cpp | 44 | hle/kernel/condition_variable.h |
| 45 | hle/service/apm/apm.cpp | 45 | hle/kernel/domain.cpp |
| 46 | hle/service/audio/audio.cpp | 46 | hle/kernel/domain.h |
| 47 | hle/service/audio/audout_u.cpp | 47 | hle/kernel/errors.h |
| 48 | hle/service/hid/hid.cpp | 48 | hle/kernel/event.cpp |
| 49 | hle/service/lm/lm.cpp | 49 | hle/kernel/event.h |
| 50 | hle/service/nvdrv/devices/nvdisp_disp0.cpp | 50 | hle/kernel/handle_table.cpp |
| 51 | hle/service/nvdrv/devices/nvhost_as_gpu.cpp | 51 | hle/kernel/handle_table.h |
| 52 | hle/service/nvdrv/devices/nvmap.cpp | 52 | hle/kernel/hle_ipc.cpp |
| 53 | hle/service/nvdrv/interface.cpp | 53 | hle/kernel/hle_ipc.h |
| 54 | hle/service/nvdrv/nvdrv.cpp | 54 | hle/kernel/kernel.cpp |
| 55 | hle/service/pctl/pctl.cpp | 55 | hle/kernel/kernel.h |
| 56 | hle/service/pctl/pctl_a.cpp | 56 | hle/kernel/memory.cpp |
| 57 | hle/service/service.cpp | 57 | hle/kernel/memory.h |
| 58 | hle/service/sm/controller.cpp | 58 | hle/kernel/mutex.cpp |
| 59 | hle/service/sm/sm.cpp | 59 | hle/kernel/mutex.h |
| 60 | hle/service/time/time.cpp | 60 | hle/kernel/object_address_table.cpp |
| 61 | hle/service/vi/vi.cpp | 61 | hle/kernel/object_address_table.h |
| 62 | hle/service/vi/vi_m.cpp | 62 | hle/kernel/process.cpp |
| 63 | hle/shared_page.cpp | 63 | hle/kernel/process.h |
| 64 | hw/hw.cpp | 64 | hle/kernel/resource_limit.cpp |
| 65 | hw/lcd.cpp | 65 | hle/kernel/resource_limit.h |
| 66 | loader/elf.cpp | 66 | hle/kernel/server_port.cpp |
| 67 | loader/linker.cpp | 67 | hle/kernel/server_port.h |
| 68 | loader/loader.cpp | 68 | hle/kernel/server_session.cpp |
| 69 | loader/nro.cpp | 69 | hle/kernel/server_session.h |
| 70 | loader/nso.cpp | 70 | hle/kernel/session.h |
| 71 | tracer/recorder.cpp | 71 | hle/kernel/shared_memory.cpp |
| 72 | memory.cpp | 72 | hle/kernel/shared_memory.h |
| 73 | perf_stats.cpp | 73 | hle/kernel/svc.cpp |
| 74 | settings.cpp | 74 | hle/kernel/svc.h |
| 75 | telemetry_session.cpp | 75 | hle/kernel/svc_wrap.h |
| 76 | ) | 76 | hle/kernel/sync_object.h |
| 77 | hle/kernel/thread.cpp | ||
| 78 | hle/kernel/thread.h | ||
| 79 | hle/kernel/timer.cpp | ||
| 80 | hle/kernel/timer.h | ||
| 81 | hle/kernel/vm_manager.cpp | ||
| 82 | hle/kernel/vm_manager.h | ||
| 83 | hle/kernel/wait_object.cpp | ||
| 84 | hle/kernel/wait_object.h | ||
| 85 | hle/lock.cpp | ||
| 86 | hle/lock.h | ||
| 87 | hle/result.h | ||
| 88 | hle/romfs.cpp | ||
| 89 | hle/romfs.h | ||
| 90 | hle/service/acc/acc.cpp | ||
| 91 | hle/service/acc/acc.h | ||
| 92 | hle/service/acc/acc_u0.cpp | ||
| 93 | hle/service/acc/acc_u0.h | ||
| 94 | hle/service/am/am.cpp | ||
| 95 | hle/service/am/am.h | ||
| 96 | hle/service/am/applet_oe.cpp | ||
| 97 | hle/service/am/applet_oe.h | ||
| 98 | hle/service/aoc/aoc_u.cpp | ||
| 99 | hle/service/aoc/aoc_u.h | ||
| 100 | hle/service/apm/apm.cpp | ||
| 101 | hle/service/apm/apm.h | ||
| 102 | hle/service/audio/audio.cpp | ||
| 103 | hle/service/audio/audio.h | ||
| 104 | hle/service/audio/audout_u.cpp | ||
| 105 | hle/service/audio/audout_u.h | ||
| 106 | hle/service/hid/hid.cpp | ||
| 107 | hle/service/hid/hid.h | ||
| 108 | hle/service/lm/lm.cpp | ||
| 109 | hle/service/lm/lm.h | ||
| 110 | hle/service/nvdrv/devices/nvdevice.h | ||
| 111 | hle/service/nvdrv/devices/nvdisp_disp0.cpp | ||
| 112 | hle/service/nvdrv/devices/nvdisp_disp0.h | ||
| 113 | hle/service/nvdrv/devices/nvhost_as_gpu.cpp | ||
| 114 | hle/service/nvdrv/devices/nvhost_as_gpu.h | ||
| 115 | hle/service/nvdrv/devices/nvmap.cpp | ||
| 116 | hle/service/nvdrv/devices/nvmap.h | ||
| 117 | hle/service/nvdrv/interface.cpp | ||
| 118 | hle/service/nvdrv/interface.h | ||
| 119 | hle/service/nvdrv/nvdrv.cpp | ||
| 120 | hle/service/nvdrv/nvdrv.h | ||
| 121 | hle/service/pctl/pctl.cpp | ||
| 122 | hle/service/pctl/pctl.h | ||
| 123 | hle/service/pctl/pctl_a.cpp | ||
| 124 | hle/service/pctl/pctl_a.h | ||
| 125 | hle/service/service.cpp | ||
| 126 | hle/service/service.h | ||
| 127 | hle/service/sm/controller.cpp | ||
| 128 | hle/service/sm/controller.h | ||
| 129 | hle/service/sm/sm.cpp | ||
| 130 | hle/service/sm/sm.h | ||
| 131 | hle/service/time/time.cpp | ||
| 132 | hle/service/time/time.h | ||
| 133 | hle/service/vi/vi.cpp | ||
| 134 | hle/service/vi/vi.h | ||
| 135 | hle/service/vi/vi_m.cpp | ||
| 136 | hle/service/vi/vi_m.h | ||
| 137 | hle/shared_page.cpp | ||
| 138 | hle/shared_page.h | ||
| 139 | hw/hw.cpp | ||
| 140 | hw/hw.h | ||
| 141 | hw/lcd.cpp | ||
| 142 | hw/lcd.h | ||
| 143 | loader/elf.cpp | ||
| 144 | loader/elf.h | ||
| 145 | loader/linker.cpp | ||
| 146 | loader/linker.h | ||
| 147 | loader/loader.cpp | ||
| 148 | loader/loader.h | ||
| 149 | loader/nro.cpp | ||
| 150 | loader/nro.h | ||
| 151 | loader/nso.cpp | ||
| 152 | loader/nso.h | ||
| 153 | memory.cpp | ||
| 154 | memory.h | ||
| 155 | memory_setup.h | ||
| 156 | mmio.h | ||
| 157 | perf_stats.cpp | ||
| 158 | perf_stats.h | ||
| 159 | settings.cpp | ||
| 160 | settings.h | ||
| 161 | telemetry_session.cpp | ||
| 162 | telemetry_session.h | ||
| 163 | tracer/citrace.h | ||
| 164 | tracer/recorder.cpp | ||
| 165 | tracer/recorder.h | ||
| 166 | ) | ||
| 77 | 167 | ||
| 78 | set(HEADERS | 168 | create_target_directory_groups(core) |
| 79 | arm/arm_interface.h | ||
| 80 | arm/dynarmic/arm_dynarmic.h | ||
| 81 | arm/unicorn/arm_unicorn.h | ||
| 82 | core.h | ||
| 83 | core_timing.h | ||
| 84 | file_sys/archive_backend.h | ||
| 85 | file_sys/directory_backend.h | ||
| 86 | file_sys/disk_archive.h | ||
| 87 | file_sys/errors.h | ||
| 88 | file_sys/file_backend.h | ||
| 89 | file_sys/ivfc_archive.h | ||
| 90 | file_sys/path_parser.h | ||
| 91 | file_sys/savedata_archive.h | ||
| 92 | file_sys/title_metadata.h | ||
| 93 | frontend/emu_window.h | ||
| 94 | frontend/framebuffer_layout.h | ||
| 95 | frontend/input.h | ||
| 96 | gdbstub/gdbstub.h | ||
| 97 | hle/config_mem.h | ||
| 98 | hle/ipc.h | ||
| 99 | hle/ipc_helpers.h | ||
| 100 | hle/kernel/address_arbiter.h | ||
| 101 | hle/kernel/client_port.h | ||
| 102 | hle/kernel/client_session.h | ||
| 103 | hle/kernel/condition_variable.h | ||
| 104 | hle/kernel/domain.h | ||
| 105 | hle/kernel/errors.h | ||
| 106 | hle/kernel/event.h | ||
| 107 | hle/kernel/handle_table.h | ||
| 108 | hle/kernel/hle_ipc.h | ||
| 109 | hle/kernel/kernel.h | ||
| 110 | hle/kernel/memory.h | ||
| 111 | hle/kernel/mutex.h | ||
| 112 | hle/kernel/object_address_table.h | ||
| 113 | hle/kernel/process.h | ||
| 114 | hle/kernel/resource_limit.h | ||
| 115 | hle/kernel/server_port.h | ||
| 116 | hle/kernel/server_session.h | ||
| 117 | hle/kernel/session.h | ||
| 118 | hle/kernel/shared_memory.h | ||
| 119 | hle/kernel/sync_object.h | ||
| 120 | hle/kernel/svc.h | ||
| 121 | hle/kernel/svc_wrap.h | ||
| 122 | hle/kernel/thread.h | ||
| 123 | hle/kernel/timer.h | ||
| 124 | hle/kernel/vm_manager.h | ||
| 125 | hle/kernel/wait_object.h | ||
| 126 | hle/lock.h | ||
| 127 | hle/result.h | ||
| 128 | hle/romfs.h | ||
| 129 | hle/service/acc/acc.h | ||
| 130 | hle/service/acc/acc_u0.h | ||
| 131 | hle/service/am/am.h | ||
| 132 | hle/service/am/applet_oe.h | ||
| 133 | hle/service/aoc/aoc_u.h | ||
| 134 | hle/service/apm/apm.h | ||
| 135 | hle/service/audio/audio.h | ||
| 136 | hle/service/audio/audout_u.h | ||
| 137 | hle/service/hid/hid.h | ||
| 138 | hle/service/lm/lm.h | ||
| 139 | hle/service/nvdrv/devices/nvdevice.h | ||
| 140 | hle/service/nvdrv/devices/nvdisp_disp0.h | ||
| 141 | hle/service/nvdrv/devices/nvhost_as_gpu.h | ||
| 142 | hle/service/nvdrv/devices/nvmap.h | ||
| 143 | hle/service/nvdrv/interface.h | ||
| 144 | hle/service/nvdrv/nvdrv.h | ||
| 145 | hle/service/pctl/pctl.h | ||
| 146 | hle/service/pctl/pctl_a.h | ||
| 147 | hle/service/service.h | ||
| 148 | hle/service/sm/controller.h | ||
| 149 | hle/service/sm/sm.h | ||
| 150 | hle/service/time/time.h | ||
| 151 | hle/service/vi/vi.h | ||
| 152 | hle/service/vi/vi_m.h | ||
| 153 | hle/shared_page.h | ||
| 154 | hw/hw.h | ||
| 155 | hw/lcd.h | ||
| 156 | loader/elf.h | ||
| 157 | loader/linker.h | ||
| 158 | loader/loader.h | ||
| 159 | loader/nro.h | ||
| 160 | loader/nso.h | ||
| 161 | tracer/recorder.h | ||
| 162 | tracer/citrace.h | ||
| 163 | memory.h | ||
| 164 | memory_setup.h | ||
| 165 | mmio.h | ||
| 166 | perf_stats.h | ||
| 167 | settings.h | ||
| 168 | telemetry_session.h | ||
| 169 | ) | ||
| 170 | 169 | ||
| 171 | create_directory_groups(${SRCS} ${HEADERS}) | ||
| 172 | add_library(core STATIC ${SRCS} ${HEADERS}) | ||
| 173 | target_link_libraries(core PUBLIC common PRIVATE dynarmic video_core) | 170 | target_link_libraries(core PUBLIC common PRIVATE dynarmic video_core) |
| 174 | target_link_libraries(core PUBLIC Boost::boost PRIVATE fmt lz4_static unicorn) | 171 | target_link_libraries(core PUBLIC Boost::boost PRIVATE fmt lz4_static unicorn) |
diff --git a/src/input_common/CMakeLists.txt b/src/input_common/CMakeLists.txt index 92792a702..1c7db28c0 100644 --- a/src/input_common/CMakeLists.txt +++ b/src/input_common/CMakeLists.txt | |||
| @@ -1,25 +1,18 @@ | |||
| 1 | set(SRCS | 1 | add_library(input_common STATIC |
| 2 | analog_from_button.cpp | 2 | analog_from_button.cpp |
| 3 | keyboard.cpp | 3 | analog_from_button.h |
| 4 | main.cpp | 4 | keyboard.cpp |
| 5 | motion_emu.cpp | 5 | keyboard.h |
| 6 | ) | 6 | main.cpp |
| 7 | main.h | ||
| 8 | motion_emu.cpp | ||
| 9 | motion_emu.h | ||
| 7 | 10 | ||
| 8 | set(HEADERS | 11 | $<$<BOOL:${SDL2_FOUND}>:sdl/sdl.cpp sdl/sdl.h> |
| 9 | analog_from_button.h | 12 | ) |
| 10 | keyboard.h | ||
| 11 | main.h | ||
| 12 | motion_emu.h | ||
| 13 | ) | ||
| 14 | 13 | ||
| 15 | if(SDL2_FOUND) | 14 | create_target_directory_groups(input_common) |
| 16 | set(SRCS ${SRCS} sdl/sdl.cpp) | ||
| 17 | set(HEADERS ${HEADERS} sdl/sdl.h) | ||
| 18 | endif() | ||
| 19 | |||
| 20 | create_directory_groups(${SRCS} ${HEADERS}) | ||
| 21 | 15 | ||
| 22 | add_library(input_common STATIC ${SRCS} ${HEADERS}) | ||
| 23 | target_link_libraries(input_common PUBLIC core PRIVATE common) | 16 | target_link_libraries(input_common PUBLIC core PRIVATE common) |
| 24 | 17 | ||
| 25 | if(SDL2_FOUND) | 18 | if(SDL2_FOUND) |
diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt index 1b8fb2a9f..12f1b93e0 100644 --- a/src/tests/CMakeLists.txt +++ b/src/tests/CMakeLists.txt | |||
| @@ -1,20 +1,16 @@ | |||
| 1 | set(SRCS | 1 | add_executable(tests |
| 2 | common/param_package.cpp | 2 | common/param_package.cpp |
| 3 | core/arm/arm_test_common.cpp | 3 | core/arm/arm_test_common.cpp |
| 4 | core/core_timing.cpp | 4 | core/arm/arm_test_common.h |
| 5 | core/file_sys/path_parser.cpp | 5 | core/core_timing.cpp |
| 6 | core/memory/memory.cpp | 6 | core/file_sys/path_parser.cpp |
| 7 | glad.cpp | 7 | core/memory/memory.cpp |
| 8 | tests.cpp | 8 | glad.cpp |
| 9 | ) | 9 | tests.cpp |
| 10 | ) | ||
| 10 | 11 | ||
| 11 | set(HEADERS | 12 | create_target_directory_groups(tests) |
| 12 | core/arm/arm_test_common.h | ||
| 13 | ) | ||
| 14 | 13 | ||
| 15 | create_directory_groups(${SRCS} ${HEADERS}) | ||
| 16 | |||
| 17 | add_executable(tests ${SRCS} ${HEADERS}) | ||
| 18 | target_link_libraries(tests PRIVATE common core) | 14 | target_link_libraries(tests PRIVATE common core) |
| 19 | target_link_libraries(tests PRIVATE glad) # To support linker work-around | 15 | target_link_libraries(tests PRIVATE glad) # To support linker work-around |
| 20 | target_link_libraries(tests PRIVATE ${PLATFORM_LIBRARIES} catch-single-include Threads::Threads) | 16 | target_link_libraries(tests PRIVATE ${PLATFORM_LIBRARIES} catch-single-include Threads::Threads) |
diff --git a/src/video_core/CMakeLists.txt b/src/video_core/CMakeLists.txt index 3fd177c46..69f2b4afd 100644 --- a/src/video_core/CMakeLists.txt +++ b/src/video_core/CMakeLists.txt | |||
| @@ -1,23 +1,19 @@ | |||
| 1 | set(SRCS | 1 | add_library(video_core STATIC |
| 2 | renderer_base.cpp | 2 | renderer_base.cpp |
| 3 | renderer_opengl/gl_shader_util.cpp | 3 | renderer_base.h |
| 4 | renderer_opengl/gl_state.cpp | 4 | renderer_opengl/gl_resource_manager.h |
| 5 | renderer_opengl/renderer_opengl.cpp | 5 | renderer_opengl/gl_shader_util.cpp |
| 6 | video_core.cpp | 6 | renderer_opengl/gl_shader_util.h |
| 7 | ) | 7 | renderer_opengl/gl_state.cpp |
| 8 | renderer_opengl/gl_state.h | ||
| 9 | renderer_opengl/renderer_opengl.cpp | ||
| 10 | renderer_opengl/renderer_opengl.h | ||
| 11 | utils.h | ||
| 12 | video_core.cpp | ||
| 13 | video_core.h | ||
| 14 | ) | ||
| 8 | 15 | ||
| 9 | set(HEADERS | 16 | create_target_directory_groups(video_core) |
| 10 | renderer_base.h | ||
| 11 | renderer_opengl/gl_resource_manager.h | ||
| 12 | renderer_opengl/gl_shader_util.h | ||
| 13 | renderer_opengl/gl_state.h | ||
| 14 | renderer_opengl/renderer_opengl.h | ||
| 15 | utils.h | ||
| 16 | video_core.h | ||
| 17 | ) | ||
| 18 | 17 | ||
| 19 | create_directory_groups(${SRCS} ${HEADERS}) | ||
| 20 | |||
| 21 | add_library(video_core STATIC ${SRCS} ${HEADERS}) | ||
| 22 | target_link_libraries(video_core PUBLIC common core) | 18 | target_link_libraries(video_core PUBLIC common core) |
| 23 | target_link_libraries(video_core PRIVATE glad) | 19 | target_link_libraries(video_core PRIVATE glad) |
diff --git a/src/yuzu/CMakeLists.txt b/src/yuzu/CMakeLists.txt index f5c46f1e9..0c4056c49 100644 --- a/src/yuzu/CMakeLists.txt +++ b/src/yuzu/CMakeLists.txt | |||
| @@ -3,79 +3,84 @@ set(CMAKE_AUTORCC ON) | |||
| 3 | set(CMAKE_INCLUDE_CURRENT_DIR ON) | 3 | set(CMAKE_INCLUDE_CURRENT_DIR ON) |
| 4 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/CMakeModules) | 4 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/CMakeModules) |
| 5 | 5 | ||
| 6 | set(SRCS | 6 | add_executable(yuzu |
| 7 | about_dialog.cpp | 7 | Info.plist |
| 8 | configuration/config.cpp | 8 | about_dialog.cpp |
| 9 | configuration/configure_debug.cpp | 9 | about_dialog.h |
| 10 | configuration/configure_dialog.cpp | 10 | bootmanager.cpp |
| 11 | configuration/configure_general.cpp | 11 | bootmanager.h |
| 12 | configuration/configure_graphics.cpp | 12 | configuration/config.cpp |
| 13 | configuration/configure_input.cpp | 13 | configuration/config.h |
| 14 | configuration/configure_system.cpp | 14 | configuration/configure_debug.cpp |
| 15 | debugger/profiler.cpp | 15 | configuration/configure_debug.h |
| 16 | debugger/registers.cpp | 16 | configuration/configure_dialog.cpp |
| 17 | debugger/wait_tree.cpp | 17 | configuration/configure_dialog.h |
| 18 | util/spinbox.cpp | 18 | configuration/configure_general.cpp |
| 19 | util/util.cpp | 19 | configuration/configure_general.h |
| 20 | bootmanager.cpp | 20 | configuration/configure_graphics.cpp |
| 21 | game_list.cpp | 21 | configuration/configure_graphics.h |
| 22 | hotkeys.cpp | 22 | configuration/configure_input.cpp |
| 23 | main.cpp | 23 | configuration/configure_input.h |
| 24 | ui_settings.cpp | 24 | configuration/configure_system.cpp |
| 25 | yuzu.rc | 25 | configuration/configure_system.h |
| 26 | Info.plist | 26 | debugger/profiler.cpp |
| 27 | ) | 27 | debugger/profiler.h |
| 28 | 28 | debugger/registers.cpp | |
| 29 | set(HEADERS | 29 | debugger/registers.h |
| 30 | about_dialog.h | 30 | debugger/wait_tree.cpp |
| 31 | configuration/config.h | 31 | debugger/wait_tree.h |
| 32 | configuration/configure_debug.h | 32 | game_list.cpp |
| 33 | configuration/configure_dialog.h | 33 | game_list.h |
| 34 | configuration/configure_general.h | 34 | game_list_p.h |
| 35 | configuration/configure_graphics.h | 35 | hotkeys.cpp |
| 36 | configuration/configure_input.h | 36 | hotkeys.h |
| 37 | configuration/configure_system.h | 37 | main.cpp |
| 38 | debugger/profiler.h | 38 | main.h |
| 39 | debugger/registers.h | 39 | ui_settings.cpp |
| 40 | debugger/wait_tree.h | 40 | ui_settings.h |
| 41 | util/spinbox.h | 41 | util/spinbox.cpp |
| 42 | util/util.h | 42 | util/spinbox.h |
| 43 | bootmanager.h | 43 | util/util.cpp |
| 44 | game_list.h | 44 | util/util.h |
| 45 | game_list_p.h | 45 | yuzu.rc |
| 46 | hotkeys.h | 46 | ) |
| 47 | main.h | ||
| 48 | ui_settings.h | ||
| 49 | ) | ||
| 50 | 47 | ||
| 51 | set(UIS | 48 | set(UIS |
| 52 | aboutdialog.ui | 49 | aboutdialog.ui |
| 53 | configuration/configure.ui | 50 | configuration/configure.ui |
| 54 | configuration/configure_debug.ui | 51 | configuration/configure_debug.ui |
| 55 | configuration/configure_general.ui | 52 | configuration/configure_general.ui |
| 56 | configuration/configure_graphics.ui | 53 | configuration/configure_graphics.ui |
| 57 | configuration/configure_input.ui | 54 | configuration/configure_input.ui |
| 58 | configuration/configure_system.ui | 55 | configuration/configure_system.ui |
| 59 | debugger/registers.ui | 56 | debugger/registers.ui |
| 60 | hotkeys.ui | 57 | hotkeys.ui |
| 61 | main.ui | 58 | main.ui |
| 62 | ) | 59 | ) |
| 63 | 60 | ||
| 64 | file(GLOB_RECURSE ICONS ${CMAKE_SOURCE_DIR}/dist/icons/*) | 61 | file(GLOB_RECURSE ICONS ${CMAKE_SOURCE_DIR}/dist/icons/*) |
| 65 | file(GLOB_RECURSE THEMES ${CMAKE_SOURCE_DIR}/dist/qt_themes/*) | 62 | file(GLOB_RECURSE THEMES ${CMAKE_SOURCE_DIR}/dist/qt_themes/*) |
| 66 | 63 | ||
| 67 | create_directory_groups(${SRCS} ${HEADERS} ${UIS}) | ||
| 68 | |||
| 69 | qt5_wrap_ui(UI_HDRS ${UIS}) | 64 | qt5_wrap_ui(UI_HDRS ${UIS}) |
| 70 | 65 | ||
| 66 | target_sources(yuzu | ||
| 67 | PRIVATE | ||
| 68 | ${ICONS} | ||
| 69 | ${THEMES} | ||
| 70 | ${UI_HDRS} | ||
| 71 | ${UIS} | ||
| 72 | ) | ||
| 73 | |||
| 71 | if (APPLE) | 74 | if (APPLE) |
| 72 | set(MACOSX_ICON "../../dist/yuzu.icns") | 75 | set(MACOSX_ICON "../../dist/yuzu.icns") |
| 73 | set_source_files_properties(${MACOSX_ICON} PROPERTIES MACOSX_PACKAGE_LOCATION Resources) | 76 | set_source_files_properties(${MACOSX_ICON} PROPERTIES MACOSX_PACKAGE_LOCATION Resources) |
| 74 | add_executable(yuzu MACOSX_BUNDLE ${SRCS} ${HEADERS} ${UI_HDRS} ${MACOSX_ICON} ${ICONS}) | 77 | target_sources(yuzu PRIVATE ${MACOSX_ICON}) |
| 78 | set_target_properties(yuzu PROPERTIES MACOSX_BUNDLE TRUE) | ||
| 75 | set_target_properties(yuzu PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist) | 79 | set_target_properties(yuzu PROPERTIES MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/Info.plist) |
| 76 | else() | ||
| 77 | add_executable(yuzu ${SRCS} ${HEADERS} ${UI_HDRS} ${ICONS}) | ||
| 78 | endif() | 80 | endif() |
| 81 | |||
| 82 | create_target_directory_groups(yuzu) | ||
| 83 | |||
| 79 | target_link_libraries(yuzu PRIVATE common core input_common video_core) | 84 | target_link_libraries(yuzu PRIVATE common core input_common video_core) |
| 80 | target_link_libraries(yuzu PRIVATE Boost::boost glad Qt5::OpenGL Qt5::Widgets) | 85 | target_link_libraries(yuzu PRIVATE Boost::boost glad Qt5::OpenGL Qt5::Widgets) |
| 81 | target_link_libraries(yuzu PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads) | 86 | target_link_libraries(yuzu PRIVATE ${PLATFORM_LIBRARIES} Threads::Threads) |
diff --git a/src/yuzu_cmd/CMakeLists.txt b/src/yuzu_cmd/CMakeLists.txt index 433e210b0..297dab653 100644 --- a/src/yuzu_cmd/CMakeLists.txt +++ b/src/yuzu_cmd/CMakeLists.txt | |||
| @@ -1,21 +1,18 @@ | |||
| 1 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/CMakeModules) | 1 | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/CMakeModules) |
| 2 | 2 | ||
| 3 | set(SRCS | 3 | add_executable(yuzu-cmd |
| 4 | emu_window/emu_window_sdl2.cpp | 4 | config.cpp |
| 5 | config.cpp | 5 | config.h |
| 6 | yuzu.cpp | 6 | default_ini.h |
| 7 | yuzu.rc | 7 | emu_window/emu_window_sdl2.cpp |
| 8 | ) | 8 | emu_window/emu_window_sdl2.h |
| 9 | set(HEADERS | 9 | resource.h |
| 10 | emu_window/emu_window_sdl2.h | 10 | yuzu.cpp |
| 11 | config.h | 11 | yuzu.rc |
| 12 | default_ini.h | 12 | ) |
| 13 | resource.h | ||
| 14 | ) | ||
| 15 | 13 | ||
| 16 | create_directory_groups(${SRCS} ${HEADERS}) | 14 | create_target_directory_groups(yuzu-cmd) |
| 17 | 15 | ||
| 18 | add_executable(yuzu-cmd ${SRCS} ${HEADERS}) | ||
| 19 | target_link_libraries(yuzu-cmd PRIVATE common core input_common) | 16 | target_link_libraries(yuzu-cmd PRIVATE common core input_common) |
| 20 | target_link_libraries(yuzu-cmd PRIVATE inih glad) | 17 | target_link_libraries(yuzu-cmd PRIVATE inih glad) |
| 21 | if (MSVC) | 18 | if (MSVC) |