Files
PS2Recomp/ps2xRuntime/CMakeLists.txt
T
Ranieri 4a538d3589 Feature/resident evil code veronica patch 1 (#60)
* feat: split runtime code in small files to be easy to develop

* feat: split stubs in inl files

* feat: function auto link function treat functions with underscore as same as without underscore

* feat: remove underscore prefix from stubs

* feat: thread and flags refactor

* feat: propagate request stop
feat: some elf validation on runtime

* feat: remove Z7 compiler options
feat: added a literal float case error on vu

* fix: fix critical recompiler error on marking pc calls

* feat: better system interrupt
refactor: small refactor on thread system

* feat: stubs implements for resident evil code veronica

* feat: merge fileio
2026-02-17 23:33:44 -03:00

73 lines
1.7 KiB
CMake

cmake_minimum_required(VERSION 3.20)
project(PS2Runtime VERSION 0.1.0 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
include(FetchContent)
set(FETCHCONTENT_QUIET FALSE)
set(BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
set(BUILD_GAMES OFF CACHE BOOL "" FORCE)
FetchContent_Declare(
raylib
GIT_REPOSITORY "https://github.com/raysan5/raylib.git"
GIT_TAG "5.5" # we will migrate to 4.2.0 later, trust me it will be better
GIT_PROGRESS TRUE
)
FetchContent_MakeAvailable(raylib)
add_library(ps2_runtime STATIC
src/lib/ps2_memory.cpp
src/lib/ps2_runtime.cpp
src/lib/ps2_stubs.cpp
src/lib/ps2_syscalls.cpp
)
file(GLOB RUNNER_SRC_FILES CONFIGURE_DEPENDS
"${CMAKE_CURRENT_SOURCE_DIR}/src/runner/*.cpp"
)
set(RUNNER_MAIN_CPP "${CMAKE_CURRENT_SOURCE_DIR}/src/runner/main.cpp")
set(ROOT_MAIN_CPP "${CMAKE_CURRENT_SOURCE_DIR}/src/main.cpp")
if(EXISTS "${RUNNER_MAIN_CPP}")
list(APPEND RUNNER_SRC_FILES "${RUNNER_MAIN_CPP}")
elseif(EXISTS "${ROOT_MAIN_CPP}")
list(APPEND RUNNER_SRC_FILES "${ROOT_MAIN_CPP}")
endif()
add_executable(ps2EntryRunner
${RUNNER_SRC_FILES}
)
if(MSVC)
target_compile_options(ps2EntryRunner PRIVATE /FS)
endif()
target_include_directories(ps2_runtime PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/include
)
target_link_libraries(ps2_runtime PRIVATE raylib)
target_link_libraries(ps2EntryRunner
PRIVATE
ps2_runtime
raylib
)
# Work around WinAPI vs raylib symbol clash for CloseWindow on x64
if(MSVC)
target_link_options(ps2EntryRunner PRIVATE "/FORCE:MULTIPLE")
endif()
install(TARGETS ps2_runtime
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
install(DIRECTORY include/
DESTINATION include
)