Files
PS2Recomp/ps2xRecomp/CMakeLists.txt
T
Ranieri 8c8a97af65 Feature/mpeg decoder (#120)
* feat: added ffmepg as dependency

* feat: wip decoder video

* feat: some perf and cleanup

* feat:  added generic MPEG stream notification

* feat: CMakeLists.txt in ps2xStudio to configure SDL2 build options for static linking.
fix: fix ffmpeg setup for linux
fix: now MPEG decoder now identify that movie has ended and can play again anytime
feat: better audio stub to not block games

* feat: fix expansion test

* feat: foo

* a

* feat: finally added a helper to to prevent thread starvation

* feat: added basic  vu0 code execution

* feat: added yield Guest Execution After Wake to prevent deadlock

* feat: added  options  on  cmake for logs
feat: better input for keyboard pad

* feat: small corrections like top and itop vu branches etc

* feat: changes

* feat: working feature

* feat: fatal frame iop

* feat: test fix
feat: z buffer fix

* fix: gix GsPutIMR IMR

* feat: added rl imgui

* feat: added helper to get snapshot

* feat: added debug panel consuming snapshots

* feat: added pad snapshot
feat: added RCP debug events

* feat: final cleanup from old code

* feat: added EE timer counter
feat: applyed sound driver for Lotr
feat: better check for sound driver compat layout
feat: enquee and cosumed DMa cause
feat: added Pad execCMd
feat: update GS vsync signal flag
feat: custom IOPs for LotR

* feat: small cleanups

* fix: fix wrong import
2026-06-26 21:04:39 -03:00

139 lines
3.1 KiB
CMake

cmake_minimum_required(VERSION 3.20)
project(PS2Recomp VERSION 0.1.0 LANGUAGES C CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED ON)
include(FetchContent)
FetchContent_Declare(
elfio
GIT_REPOSITORY https://github.com/serge1/ELFIO.git
GIT_TAG Release_3.12
GIT_SHALLOW TRUE
)
FetchContent_MakeAvailable(elfio)
FetchContent_Declare(
toml11
GIT_REPOSITORY https://github.com/ToruNiina/toml11.git
GIT_TAG v4.4.0
)
FetchContent_MakeAvailable(toml11)
FetchContent_Declare(
fmt
GIT_REPOSITORY https://github.com/fmtlib/fmt.git
GIT_TAG 12.1.0
)
FetchContent_MakeAvailable(fmt)
FetchContent_Declare(
libdwarf
GIT_REPOSITORY https://github.com/davea42/libdwarf-code.git
GIT_TAG v2.2.0
GIT_SHALLOW TRUE
)
set(BUILD_DWARFDUMP OFF CACHE BOOL "" FORCE)
set(BUILD_DWARFEXAMPLE OFF CACHE BOOL "" FORCE)
set(BUILD_DWARFGEN OFF CACHE BOOL "" FORCE)
set(BUILD_SHARED OFF CACHE BOOL "" FORCE)
set(BUILD_NON_SHARED ON CACHE BOOL "" FORCE)
FetchContent_MakeAvailable(libdwarf)
set(LIBDWARF_INCLUDE_DIR "${libdwarf_SOURCE_DIR}/src/lib/libdwarf")
FetchContent_Declare(
rabbitizer
GIT_REPOSITORY https://github.com/Decompollaborate/rabbitizer.git
GIT_TAG 1.14.3
)
FetchContent_MakeAvailable(rabbitizer)
if (NOT TARGET rabbitizer)
file(GLOB_RECURSE RABBITIZER_SOURCES CONFIGURE_DEPENDS
"${rabbitizer_SOURCE_DIR}/src/analysis/*.c"
"${rabbitizer_SOURCE_DIR}/src/common/*.c"
"${rabbitizer_SOURCE_DIR}/src/instructions/*.c"
"${rabbitizer_SOURCE_DIR}/src/instructions/*/*.c"
)
add_library(rabbitizer STATIC ${RABBITIZER_SOURCES})
target_include_directories(rabbitizer PUBLIC
"${rabbitizer_SOURCE_DIR}/include"
"${rabbitizer_SOURCE_DIR}/tables"
"${rabbitizer_SOURCE_DIR}/tables/tables"
)
endif()
file(GLOB_RECURSE PS2RECOMP_LIB_SOURCES CONFIGURE_DEPENDS
src/lib/*.cpp
)
file(GLOB_RECURSE PS2RECOMP_HEADERS CONFIGURE_DEPENDS
include/*.h
include/*.hpp
)
add_library(ps2_recomp_lib STATIC ${PS2RECOMP_LIB_SOURCES} ${PS2RECOMP_HEADERS})
target_compile_definitions(ps2_recomp_lib
PUBLIC
LIBDWARF_STATIC
PRIVATE
LIBDWARF_STATIC
)
target_include_directories(ps2_recomp_lib
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/include
${elfio_SOURCE_DIR}
${LIBDWARF_INCLUDE_DIR}
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/../ps2xRuntime/include
)
target_link_libraries(ps2_recomp_lib
PUBLIC
fmt::fmt
toml11::toml11
dwarf
rabbitizer
)
file(GLOB_RECURSE PS2RECOMP_EXE_SOURCES CONFIGURE_DEPENDS
src/runner/*.cpp
)
add_executable(ps2_recomp ${PS2RECOMP_EXE_SOURCES})
target_link_libraries(ps2_recomp
PRIVATE
ps2_recomp_lib
)
install(TARGETS ps2_recomp ps2_recomp_lib
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
install(DIRECTORY include/
DESTINATION include
)
include("${CMAKE_SOURCE_DIR}/ps2xRuntime/cmake/ReleaseMode.cmake")
if(CMAKE_BUILD_TYPE STREQUAL "Release" OR CMAKE_BUILD_TYPE STREQUAL "RelWithDebInfo")
EnableFastReleaseMode(ps2_recomp_lib)
EnableFastReleaseMode(ps2_recomp)
endif()