Files
ppsspp/UI/CMakeLists.txt
T
Henrik RydgårdandClaude Sonnet 5 ae9060d501 Extract UI into its own CMakeLists.txt
Same treatment as Common/Core/GPU: move the ppsspp_ui target definition
(kept that name rather than renaming to "UI", since it was deliberately
named that in a previous commit) into UI/CMakeLists.txt, pulled in via
add_subdirectory(UI). Source paths are now relative to UI/ instead of
prefixed with "UI/".

PPSSPPHeadless and PPSSPPUnitTest already didn't link ppsspp_ui (they
link Core/Common directly) - that's unchanged, just preserved. The main
per-platform binaries (${TargetBin}) and the Android JNI target keep
linking it as before.

add_compile_definitions(USE_DISCORD=1) has to stay in the root file
rather than move into UI/CMakeLists.txt: it only affects targets created
after the call, and add_subdirectory() snapshots the parent's directory
scope at the point it's invoked, so the definition needs to already be
set before add_subdirectory(UI) runs. Verified UI/DiscordIntegration.cpp
still pulls in Discord_Initialize etc as undefined symbols post-move.

Also removed two now-dead variable inits sitting right next to this
block: "nativeExtra" (never appended to or consumed anywhere anymore,
a leftover from before the old "native" target was removed) and a
duplicate early set(UISource) (the real one now lives inside
UI/CMakeLists.txt's own scope).

Verified with a clean ./b.sh --debug rebuild, a HEADLESS=ON UNITTEST=ON
build (confirmed ppsspp_ui/UI never gets built in that configuration),
and a LIBRETRO=ON build.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PSNaZnHCjmryS3ziVN9gZU
2026-07-24 20:16:07 +02:00

126 lines
2.6 KiB
CMake

set(UISource)
if(NOT LIBRETRO)
list(APPEND UISource
AudioCommon.h
AudioCommon.cpp
)
endif()
list(APPEND UISource
ImDebugger/ImDebugger.cpp
ImDebugger/ImDebugger.h
ImDebugger/ImGe.cpp
ImDebugger/ImGe.h
ImDebugger/ImConsole.cpp
ImDebugger/ImConsole.h
ImDebugger/ImDisasmView.cpp
ImDebugger/ImDisasmView.h
ImDebugger/ImMemView.cpp
ImDebugger/ImMemView.h
ImDebugger/ImStructViewer.cpp
ImDebugger/ImStructViewer.h
ImDebugger/ImJitViewer.cpp
ImDebugger/ImJitViewer.h
DiscordIntegration.cpp
NativeApp.cpp
AdhocServerScreen.h
AdhocServerScreen.cpp
BackgroundAudio.h
BackgroundAudio.cpp
Background.h
Background.cpp
ChatScreen.h
ChatScreen.cpp
BaseScreens.h
BaseScreens.cpp
DebugOverlay.cpp
DebugOverlay.h
DevScreens.cpp
DevScreens.h
DisplayLayoutScreen.cpp
DisplayLayoutScreen.h
EmuScreen.h
EmuScreen.cpp
GameInfoCache.h
GameInfoCache.cpp
IAPScreen.cpp
IAPScreen.h
MainScreen.h
MainScreen.cpp
GameBrowser.h
GameBrowser.cpp
MiscScreens.h
MiscScreens.cpp
MiscViews.h
MiscViews.cpp
PauseScreen.h
PauseScreen.cpp
SimpleDialogScreen.h
SimpleDialogScreen.cpp
TabbedDialogScreen.h
TabbedDialogScreen.cpp
GameScreen.h
GameScreen.cpp
GameSettingsScreen.h
GameSettingsScreen.cpp
DeveloperToolsScreen.h
DeveloperToolsScreen.cpp
DriverManagerScreen.h
DriverManagerScreen.cpp
GPUDriverTestScreen.h
GPUDriverTestScreen.cpp
TiltAnalogSettingsScreen.h
TiltAnalogSettingsScreen.cpp
TouchControlLayoutScreen.h
TouchControlLayoutScreen.cpp
TouchControlVisibilityScreen.h
TouchControlVisibilityScreen.cpp
GamepadEmu.h
GamepadEmu.cpp
JoystickHistoryView.h
JoystickHistoryView.cpp
LoadStateConfirmScreen.h
LoadStateConfirmScreen.cpp
OnScreenDisplay.h
OnScreenDisplay.cpp
ControlMappingScreen.h
ControlMappingScreen.cpp
RemoteISOScreen.h
RemoteISOScreen.cpp
ReportScreen.h
ReportScreen.cpp
SavedataScreen.h
SavedataScreen.cpp
SystemInfoScreen.h
SystemInfoScreen.cpp
Store.h
Store.cpp
UploadScreen.h
UploadScreen.cpp
CwCheatScreen.h
CwCheatScreen.cpp
InstallZipScreen.h
InstallZipScreen.cpp
JitCompareScreen.h
JitCompareScreen.cpp
MemStickScreen.h
MemStickScreen.cpp
ProfilerDraw.h
ProfilerDraw.cpp
CustomButtonMappingScreen.h
CustomButtonMappingScreen.cpp
Theme.h
Theme.cpp
UIAtlas.h
UIAtlas.cpp
RetroAchievementScreens.cpp
RetroAchievementScreens.h
)
# Headless and unit test builds never link this - they don't have a UI to show. See the
# comment above add_subdirectory(UI) in the root CMakeLists.txt for why USE_DISCORD=1 has
# to be defined before this add_subdirectory() call rather than in here.
add_library(ppsspp_ui STATIC ${UISource})
target_link_libraries(ppsspp_ui Common Core)
setup_target_project(ppsspp_ui UI)