2023-04-27 18:13:19 +02:00
|
|
|
cmake_minimum_required(VERSION 3.16.3)
|
2023-05-02 17:22:19 +02:00
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED True)
|
2023-04-27 18:13:19 +02:00
|
|
|
|
2023-05-03 18:40:47 +02:00
|
|
|
if(NOT CMAKE_BUILD_TYPE)
|
|
|
|
set(CMAKE_BUILD_TYPE Release)
|
|
|
|
endif()
|
|
|
|
|
2023-04-27 18:13:19 +02:00
|
|
|
project(shadps4)
|
|
|
|
|
|
|
|
include_directories(third-party/)
|
2023-08-11 19:22:26 +02:00
|
|
|
include_directories(third-party/discord-rpc/include)
|
2023-04-27 18:13:19 +02:00
|
|
|
include_directories(third-party/imgui/)
|
|
|
|
include_directories(third-party/imgui/backends)
|
|
|
|
include_directories(third-party/sdl/)
|
2023-04-28 11:46:29 +02:00
|
|
|
include_directories(third-party/fmt/include)
|
2023-05-02 17:22:19 +02:00
|
|
|
include_directories(third-party/magic_enum/include)
|
2023-06-23 03:48:55 +02:00
|
|
|
include_directories(third-party/zydis/include/Zydis)
|
2023-07-17 22:19:33 +02:00
|
|
|
include_directories(third-party/winpthread/include)
|
2023-09-16 09:51:09 +02:00
|
|
|
include_directories(third-party/vulkan/include)
|
2023-09-26 15:00:13 +02:00
|
|
|
include_directories(third-party/xxhash/include)
|
2023-10-19 17:39:20 +02:00
|
|
|
include_directories(third-party/result/include)
|
2023-04-27 18:13:19 +02:00
|
|
|
add_subdirectory("third-party")
|
|
|
|
#=================== EXAMPLE ===================
|
2023-08-02 14:16:00 +02:00
|
|
|
include_directories(src)
|
2023-04-27 18:13:19 +02:00
|
|
|
|
2023-10-06 20:49:53 +02:00
|
|
|
set(LIBC_SOURCES src/Emulator/HLE/Libraries/LibC/Libc.cpp
|
|
|
|
src/Emulator/HLE/Libraries/LibC/Libc.h
|
|
|
|
src/Emulator/HLE/Libraries/LibC/printf.h
|
|
|
|
src/Emulator/HLE/Libraries/LibC/va_ctx.h
|
2023-10-16 19:49:52 +02:00
|
|
|
src/Emulator/HLE/Libraries/LibC/libc_cxa.cpp
|
|
|
|
src/Emulator/HLE/Libraries/LibC/libc_cxa.h
|
2023-10-06 20:49:53 +02:00
|
|
|
)
|
|
|
|
set(USERSERVICE_SOURCES src/Emulator/HLE/Libraries/LibUserService/user_service.cpp
|
|
|
|
src/Emulator/HLE/Libraries/LibUserService/user_service.h
|
|
|
|
)
|
|
|
|
|
2023-10-31 08:01:20 +01:00
|
|
|
set(PAD_SOURCES "src/core/hle/libraries/libpad/pad.cpp"
|
|
|
|
"src/core/hle/libraries/libpad/pad.h"
|
2023-10-07 11:03:03 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
set(SYSTEMSERVICE_SOURCES src/Emulator/HLE/Libraries/LibSystemService/system_service.cpp
|
|
|
|
src/Emulator/HLE/Libraries/LibSystemService/system_service.h
|
|
|
|
)
|
|
|
|
|
2023-10-31 07:47:58 +01:00
|
|
|
set(FILESYSTEM_SOURCES "src/core/hle/libraries/libkernel/file_system.cpp"
|
|
|
|
"src/core/hle/libraries/libkernel/file_system.h"
|
2023-10-30 22:04:57 +01:00
|
|
|
|
|
|
|
|
2023-10-20 06:25:52 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
set(HOST_SOURCES src/Emulator/Host/controller.cpp
|
|
|
|
src/Emulator/Host/controller.h
|
2023-10-19 11:13:09 +02:00
|
|
|
)
|
|
|
|
|
2023-10-13 08:40:59 +02:00
|
|
|
set(UTIL_SOURCES src/Emulator/Util/singleton.h
|
|
|
|
)
|
|
|
|
|
2023-04-27 18:13:19 +02:00
|
|
|
add_executable(shadps4
|
2023-10-06 20:49:53 +02:00
|
|
|
${LIBC_SOURCES}
|
|
|
|
${USERSERVICE_SOURCES}
|
2023-10-07 11:03:03 +02:00
|
|
|
${PAD_SOURCES}
|
|
|
|
${SYSTEMSERVICE_SOURCES}
|
2023-10-19 11:13:09 +02:00
|
|
|
${FILESYSTEM_SOURCES}
|
2023-10-20 06:25:52 +02:00
|
|
|
${HOST_SOURCES}
|
2023-10-13 08:40:59 +02:00
|
|
|
${UTIL_SOURCES}
|
2023-10-29 22:46:18 +01:00
|
|
|
src/Lib/Timer.cpp
|
|
|
|
src/Lib/Timer.h
|
2023-04-27 18:13:19 +02:00
|
|
|
src/main.cpp
|
2023-05-02 17:22:19 +02:00
|
|
|
src/types.h
|
2023-10-31 07:47:58 +01:00
|
|
|
src/core/FsFile.cpp
|
|
|
|
src/core/FsFile.h
|
|
|
|
src/core/PS4/Loader/Elf.cpp
|
|
|
|
src/core/PS4/Loader/Elf.h
|
2023-05-03 18:40:47 +02:00
|
|
|
src/GUI/ElfViewer.cpp
|
2023-05-23 06:48:25 +02:00
|
|
|
src/GUI/ElfViewer.h
|
2023-08-13 15:54:56 +02:00
|
|
|
src/Util/log.h
|
|
|
|
src/Util/log.cpp
|
2023-08-14 19:17:01 +02:00
|
|
|
src/Util/config.cpp
|
|
|
|
src/Util/config.h
|
2023-10-31 07:47:58 +01:00
|
|
|
src/core/virtual_memory.cpp
|
|
|
|
src/core/virtual_memory.h
|
|
|
|
src/core/PS4/Linker.cpp
|
|
|
|
src/core/PS4/Linker.h
|
|
|
|
src/core/PS4/Stubs.cpp
|
|
|
|
src/core/PS4/Stubs.h
|
|
|
|
src/core/PS4/Util/aerolib.cpp
|
|
|
|
src/core/PS4/HLE/Kernel/Objects/physical_memory.h
|
|
|
|
src/core/PS4/HLE/Kernel/Objects/physical_memory.cpp
|
2023-08-04 10:33:00 +02:00
|
|
|
src/Util/string_util.cpp
|
|
|
|
src/Util/string_util.cpp
|
2023-10-31 07:47:58 +01:00
|
|
|
src/core/PS4/HLE/Graphics/video_out.cpp
|
|
|
|
src/core/PS4/HLE/Graphics/video_out.h
|
2023-08-11 19:22:26 +02:00
|
|
|
src/discord.h
|
|
|
|
src/discord.cpp
|
2023-10-31 07:47:58 +01:00
|
|
|
src/core/PS4/HLE/Kernel/event_queues.cpp
|
|
|
|
src/core/PS4/HLE/Kernel/event_queues.h
|
|
|
|
src/core/PS4/HLE/Kernel/cpu_management.cpp
|
|
|
|
src/core/PS4/HLE/Kernel/cpu_management.h
|
2023-09-28 17:17:39 +02:00
|
|
|
|
2023-10-31 07:47:58 +01:00
|
|
|
"src/Util/Disassembler.cpp" "src/Util/Disassembler.h" "src/core/PS4/Util/aerolib.h" "src/core/PS4/Loader/SymbolsResolver.h" "src/core/PS4/Loader/SymbolsResolver.cpp" "src/core/PS4/HLE/Libs.cpp" "src/core/PS4/HLE/Libs.h" "src/core/PS4/HLE/LibC.cpp" "src/core/PS4/HLE/LibC.h" "src/core/PS4/HLE/LibKernel.cpp" "src/core/PS4/HLE/LibKernel.h" "src/core/PS4/HLE/LibSceGnmDriver.cpp" "src/core/PS4/HLE/LibSceGnmDriver.h" "src/core/PS4/HLE/Kernel/ThreadManagement.cpp" "src/core/PS4/HLE/Kernel/ThreadManagement.h" "src/core/PS4/HLE/ErrorCodes.h" "src/debug.h" "src/core/PS4/HLE/Kernel/memory_management.cpp" "src/core/PS4/HLE/Kernel/memory_management.h" "src/core/PS4/GPU/gpu_memory.cpp" "src/core/PS4/GPU/gpu_memory.h" "src/emulator.cpp" "src/emulator.h" "src/core/PS4/HLE/Kernel/Objects/event_queue.h" "src/core/PS4/HLE/Kernel/Objects/event_queue.cpp" "src/core/PS4/HLE/Graphics/Objects/video_out_ctx.cpp" "src/core/PS4/HLE/Graphics/Objects/video_out_ctx.h" "src/core/PS4/HLE/Graphics/graphics_ctx.h" "src/vulkan_util.cpp" "src/vulkan_util.h" "src/core/PS4/GPU/video_out_buffer.cpp" "src/core/PS4/GPU/video_out_buffer.h" "src/core/PS4/HLE/Graphics/graphics_render.cpp" "src/core/PS4/HLE/Graphics/graphics_render.h" "src/core/PS4/GPU/tile_manager.cpp" "src/core/PS4/GPU/tile_manager.h" "src/version.h" "src/Emulator/HLE/Libraries/LibSystemService/system_service.cpp" "src/Emulator/HLE/Libraries/LibSystemService/system_service.h" "src/emuTimer.cpp" "src/emuTimer.h" "src/core/hle/libraries/libkernel/time_management.cpp" "src/core/hle/libraries/libkernel/time_management.h")
|
2023-04-27 18:13:19 +02:00
|
|
|
|
|
|
|
find_package(OpenGL REQUIRED)
|
2023-09-16 09:51:09 +02:00
|
|
|
target_link_libraries(shadps4 PUBLIC fmt mincore spdlog IMGUI SDL3-shared ${OPENGL_LIBRARY} vulkan-1 spirv-tools-opt spirv-tools)
|
2023-05-10 21:22:46 +02:00
|
|
|
|
|
|
|
add_custom_command(TARGET shadps4 POST_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
|
|
$<TARGET_FILE:SDL3-shared>
|
2023-06-23 03:48:55 +02:00
|
|
|
$<TARGET_FILE_DIR:shadps4>)
|
2023-07-17 22:19:33 +02:00
|
|
|
add_custom_command(TARGET shadps4 POST_BUILD
|
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
|
|
"${PROJECT_SOURCE_DIR}/third-party/winpthread/bin/libwinpthread-1.dll" $<TARGET_FILE_DIR:shadps4>)
|