mirror of
https://github.com/RetroPortingToolKit/psxrecomp
synced 2026-10-26 02:11:36 -04:00
build: drop lib/recomp-ui; games vendor UI at repo root
Discover recomp-ui from CMAKE_SOURCE_DIR/recomp-ui (or RECOMP_UI_ROOT). Keep lib/recomp-net in the engine. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,7 +1,3 @@
|
||||
[submodule "lib/recomp-net"]
|
||||
path = lib/recomp-net
|
||||
url = https://github.com/TechnicallyComputers/recomp-net.git
|
||||
[submodule "lib/recomp-ui"]
|
||||
path = lib/recomp-ui
|
||||
url = https://github.com/mstan/recomp-ui.git
|
||||
branch = master
|
||||
|
||||
Submodule lib/recomp-ui deleted from 7511bc97b4
+20
-7
@@ -95,8 +95,18 @@ else()
|
||||
option(PSX_STATIC_RUNTIME "Statically link SDL2 + libgcc/libstdc++ for a self-contained exe" OFF)
|
||||
endif()
|
||||
|
||||
# PSX_RECOMP_UI: build the shared Dear ImGui launcher from lib/recomp-ui.
|
||||
# PSX_RECOMP_UI: wire the shared Dear ImGui launcher from the *game* repo's
|
||||
# root recomp-ui submodule (CMAKE_SOURCE_DIR/recomp-ui). Not vendored in
|
||||
# psxrecomp — games that need the launcher own the pin.
|
||||
option(PSX_RECOMP_UI "Build the shared recomp-ui Dear ImGui launcher" ON)
|
||||
set(RECOMP_UI_ROOT "" CACHE PATH
|
||||
"Path to recomp-ui; empty = <game>/recomp-ui")
|
||||
if(PSX_RECOMP_UI AND (NOT RECOMP_UI_ROOT OR RECOMP_UI_ROOT STREQUAL ""))
|
||||
if(EXISTS "${CMAKE_SOURCE_DIR}/recomp-ui/recomp_ui.cmake")
|
||||
set(RECOMP_UI_ROOT "${CMAKE_SOURCE_DIR}/recomp-ui" CACHE PATH
|
||||
"Path to recomp-ui; empty = <game>/recomp-ui" FORCE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(PSXRECOMP_RUNTIME_SOURCES
|
||||
${PSXRECOMP_ROOT}/runtime/src/main.cpp
|
||||
@@ -551,15 +561,18 @@ function(psxrecomp_add_runtime_target target)
|
||||
endif()
|
||||
|
||||
# Shared recomp-ui Dear ImGui launcher (not in the oracle build — that's headless).
|
||||
# Lives at the game repo root (RECOMP_UI_ROOT / CMAKE_SOURCE_DIR/recomp-ui),
|
||||
# not under psxrecomp/lib/.
|
||||
if(PSX_RECOMP_UI AND NOT PSXRT_ORACLE)
|
||||
if(NOT EXISTS "${PSXRECOMP_ROOT}/lib/recomp-ui/recomp_ui.cmake")
|
||||
if(NOT RECOMP_UI_ROOT OR NOT EXISTS "${RECOMP_UI_ROOT}/recomp_ui.cmake")
|
||||
message(FATAL_ERROR
|
||||
"PSX_RECOMP_UI=ON but lib/recomp-ui is missing. "
|
||||
"Run: git submodule update --init --recursive")
|
||||
"PSX_RECOMP_UI=ON but recomp-ui is missing.\n"
|
||||
"Add at the game repo root:\n"
|
||||
" git submodule add -b master "
|
||||
"https://github.com/mstan/recomp-ui.git recomp-ui\n"
|
||||
"Or set -DRECOMP_UI_ROOT=/path/to/recomp-ui")
|
||||
endif()
|
||||
set(RECOMP_UI_ROOT "${PSXRECOMP_ROOT}/lib/recomp-ui" CACHE PATH
|
||||
"Root directory of recomp-ui" FORCE)
|
||||
include("${PSXRECOMP_ROOT}/lib/recomp-ui/recomp_ui.cmake")
|
||||
include("${RECOMP_UI_ROOT}/recomp_ui.cmake")
|
||||
|
||||
set(_psx_recomp_ui_args)
|
||||
if(PSXRT_LAUNCHER_BOXART)
|
||||
|
||||
Reference in New Issue
Block a user