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/)
|
|
|
|
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-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
|
|
|
|
|
|
|
add_executable(shadps4
|
|
|
|
src/main.cpp
|
2023-05-02 17:22:19 +02:00
|
|
|
src/types.h
|
|
|
|
src/Core/FsFile.cpp
|
|
|
|
src/Core/FsFile.h
|
2023-06-19 06:51:56 +02:00
|
|
|
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
|
|
|
|
src/Util/Log.h
|
|
|
|
src/Util/Log.cpp
|
2023-08-06 21:52:20 +02:00
|
|
|
"src/Core/virtual_memory.cpp"
|
|
|
|
"src/Core/virtual_memory.h"
|
2023-05-23 06:48:25 +02:00
|
|
|
src/Core/PS4/Linker.cpp
|
|
|
|
src/Core/PS4/Linker.h
|
2023-08-01 11:49:57 +02:00
|
|
|
src/Lib/Threads.cpp
|
|
|
|
src/Lib/Threads.h
|
2023-08-02 12:51:10 +02:00
|
|
|
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-08-09 09:31:18 +02:00
|
|
|
"src/Util/Singleton.h" "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/Lib/Timer.cpp" "src/Lib/Timer.h" "src/Core/PS4/HLE/LibKernel.cpp" "src/Core/PS4/HLE/LibKernel.h" "src/Core/PS4/HLE/LibSceVideoOut.cpp" "src/Core/PS4/HLE/LibSceVideoOut.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")
|
2023-04-27 18:13:19 +02:00
|
|
|
|
|
|
|
find_package(OpenGL REQUIRED)
|
2023-08-07 17:16:26 +02:00
|
|
|
target_link_libraries(shadps4 PUBLIC fmt mincore spdlog IMGUI SDL3-shared ${OPENGL_LIBRARY})
|
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>)
|