Merge pull request #21973 from hrydgard/more-cmake-cleanup

Clean up the CMake files, matching the project structure of the MSVC build
This commit is contained in:
Henrik Rydgård authored and GitHub committed 2026-07-24 23:55:27 +02:00
commit a6e4d691ef
19 files changed
+1667 -1616

No files matched your search

+15 -1598
View File
File diff suppressed because it is too large. Load diff
+398
View File
@@ -0,0 +1,398 @@
if(WIN32)
set(CommonD3D
GPU/D3D11/thin3d_d3d11.cpp
GPU/D3D11/D3D11Loader.cpp
GPU/D3D11/D3D11Loader.h
)
endif()
set(CommonVR
VR/OpenXRLoader.cpp
VR/OpenXRLoader.h
VR/PPSSPPVR.cpp
VR/PPSSPPVR.h
VR/VRBase.cpp
VR/VRBase.h
VR/VRFramebuffer.cpp
VR/VRFramebuffer.h
VR/VRInput.cpp
VR/VRInput.h
VR/VRMath.cpp
VR/VRMath.h
VR/VRRenderer.cpp
VR/VRRenderer.h
)
add_library(Common STATIC
ABI.cpp
ABI.h
CPUDetect.cpp
CPUDetect.h
Thunk.cpp
Thunk.h
x64Analyzer.cpp
x64Analyzer.h
x64Emitter.cpp
x64Emitter.h
ArmCPUDetect.cpp
ArmEmitter.h
ArmEmitter.cpp
Arm64Emitter.h
Arm64Emitter.cpp
ArmEmitter.h
ArmEmitter.cpp
RiscVCPUDetect.cpp
RiscVEmitter.cpp
RiscVEmitter.h
LoongArchCPUDetect.cpp
LoongArch64Emitter.cpp
LoongArch64Emitter.h
${CommonD3D}
${CommonVR}
Serialize/Serializer.cpp
Serialize/Serializer.h
Serialize/SerializeDeque.h
Serialize/SerializeFuncs.h
Serialize/SerializeList.h
Serialize/SerializeMap.h
Serialize/SerializeSet.h
Crypto/md5.cpp
Crypto/md5.h
Crypto/sha1.cpp
Crypto/sha1.h
Crypto/sha256.cpp
Crypto/sha256.h
Data/Collections/ConstMap.h
Data/Collections/FixedSizeQueue.h
Data/Collections/Hashmaps.h
Data/Collections/TinySet.h
Data/Collections/FastVec.h
Data/Collections/CharQueue.h
Data/Collections/CyclicBuffer.h
Data/Collections/ThreadSafeList.h
Data/Color/RGBAUtil.cpp
Data/Color/RGBAUtil.h
Data/Convert/ColorConv.cpp
Data/Convert/ColorConv.h
Data/Convert/SmallDataConvert.cpp
Data/Convert/SmallDataConvert.h
Data/Encoding/Base64.cpp
Data/Encoding/Base64.h
Data/Encoding/Compression.cpp
Data/Encoding/Compression.h
Data/Encoding/Shiftjis.h
Data/Encoding/Utf8.cpp
Data/Encoding/Utf8.h
Data/Encoding/Utf16.h
Data/Format/RIFF.cpp
Data/Format/RIFF.h
Data/Format/IniFile.cpp
Data/Format/IniFile.h
Data/Format/JSONReader.h
Data/Format/JSONReader.cpp
Data/Format/JSONWriter.h
Data/Format/JSONWriter.cpp
Data/Format/DDSLoad.cpp
Data/Format/DDSLoad.h
Data/Format/PNGLoad.cpp
Data/Format/PNGLoad.h
Data/Format/ZIMLoad.cpp
Data/Format/ZIMLoad.h
Data/Format/ZIMSave.cpp
Data/Format/ZIMSave.h
Data/Hash/Hash.cpp
Data/Hash/Hash.h
Data/Text/I18n.cpp
Data/Text/I18n.h
Data/Text/Parsers.cpp
Data/Text/Parsers.h
Data/Text/StringWriter.h
Data/Text/WrapText.cpp
Data/Text/WrapText.h
Data/Random/Rng.h
File/VFS/VFS.h
File/VFS/VFS.cpp
File/VFS/ZipFileReader.cpp
File/VFS/ZipFileReader.h
File/VFS/SevenZipFileReader.cpp
File/VFS/SevenZipFileReader.h
File/VFS/DirectoryReader.cpp
File/VFS/DirectoryReader.h
File/AndroidStorage.h
File/AndroidStorage.cpp
File/AndroidContentURI.h
File/AndroidContentURI.cpp
File/DiskFree.h
File/DiskFree.cpp
File/Path.h
File/Path.cpp
File/PathBrowser.h
File/PathBrowser.cpp
File/FileUtil.cpp
File/FileUtil.h
File/DirListing.cpp
File/DirListing.h
File/FileDescriptor.cpp
File/FileDescriptor.h
GPU/DataFormat.h
GPU/MiscTypes.h
GPU/GPUBackendCommon.cpp
GPU/GPUBackendCommon.h
GPU/thin3d.cpp
GPU/thin3d.h
GPU/thin3d_create.h
GPU/Shader.cpp
GPU/Shader.h
GPU/ShaderWriter.cpp
GPU/ShaderWriter.h
GPU/ShaderTranslation.h
GPU/ShaderTranslation.cpp
GPU/OpenGL/GLCommon.h
GPU/OpenGL/GLDebugLog.cpp
GPU/OpenGL/GLDebugLog.h
GPU/OpenGL/GLSLProgram.cpp
GPU/OpenGL/GLSLProgram.h
GPU/OpenGL/gl3stub.c
GPU/OpenGL/gl3stub.h
GPU/OpenGL/GLFeatures.cpp
GPU/OpenGL/GLFeatures.h
GPU/OpenGL/GLFrameData.cpp
GPU/OpenGL/GLFrameData.h
GPU/OpenGL/thin3d_gl.cpp
GPU/OpenGL/GLMemory.cpp
GPU/OpenGL/GLMemory.h
GPU/OpenGL/GLRenderManager.cpp
GPU/OpenGL/GLRenderManager.h
GPU/OpenGL/GLQueueRunner.cpp
GPU/OpenGL/GLQueueRunner.h
GPU/OpenGL/GLProfiler.cpp
GPU/OpenGL/GLProfiler.h
GPU/OpenGL/DataFormatGL.cpp
GPU/OpenGL/DataFormatGL.h
GPU/Vulkan/VulkanBarrier.cpp
GPU/Vulkan/VulkanBarrier.h
GPU/Vulkan/VulkanDebug.cpp
GPU/Vulkan/VulkanDebug.h
GPU/Vulkan/VulkanContext.cpp
GPU/Vulkan/VulkanContext.h
GPU/Vulkan/VulkanDescSet.cpp
GPU/Vulkan/VulkanDescSet.h
GPU/Vulkan/VulkanFramebuffer.cpp
GPU/Vulkan/VulkanFramebuffer.h
GPU/Vulkan/VulkanImage.cpp
GPU/Vulkan/VulkanImage.h
GPU/Vulkan/VulkanLoader.cpp
GPU/Vulkan/VulkanLoader.h
GPU/Vulkan/VulkanMemory.cpp
GPU/Vulkan/VulkanMemory.h
GPU/Vulkan/VulkanProfiler.cpp
GPU/Vulkan/VulkanProfiler.h
GPU/Vulkan/thin3d_vulkan.cpp
GPU/Vulkan/VulkanRenderManager.cpp
GPU/Vulkan/VulkanRenderManager.h
GPU/Vulkan/VulkanQueueRunner.cpp
GPU/Vulkan/VulkanQueueRunner.h
GPU/Vulkan/VulkanFrameData.cpp
GPU/Vulkan/VulkanFrameData.h
Input/GestureDetector.cpp
Input/GestureDetector.h
Input/KeyCodes.h
Input/InputState.cpp
Input/InputState.h
Math/SIMDHeaders.h
Math/SIMDHeaders.h
Math/curves.cpp
Math/curves.h
Math/expression_parser.cpp
Math/expression_parser.h
Math/lin/matrix4x4.cpp
Math/lin/matrix4x4.h
Math/lin/vec3.cpp
Math/lin/vec3.h
Math/math_util.cpp
Math/math_util.h
Math/Statistics.h
Math/Statistics.cpp
Net/HTTPClient.cpp
Net/HTTPClient.h
Net/HTTPHeaders.cpp
Net/HTTPHeaders.h
Net/HTTPNaettRequest.cpp
Net/HTTPNaettRequest.h
Net/HTTPRequest.cpp
Net/HTTPRequest.h
Net/HTTPServer.cpp
Net/HTTPServer.h
Net/NetBuffer.cpp
Net/NetBuffer.h
Net/Resolve.cpp
Net/Resolve.h
Net/Sinks.cpp
Net/Sinks.h
Net/SocketCompat.h
Net/URL.cpp
Net/URL.h
Net/WebsocketServer.cpp
Net/WebsocketServer.h
Profiler/Profiler.cpp
Profiler/Profiler.h
Render/AtlasGen.cpp
Render/AtlasGen.h
Render/TextureAtlas.cpp
Render/TextureAtlas.h
Render/DrawBuffer.cpp
Render/DrawBuffer.h
Render/ManagedTexture.cpp
Render/ManagedTexture.h
Render/Text/draw_text.cpp
Render/Text/draw_text.h
Render/Text/draw_text_android.cpp
Render/Text/draw_text_android.h
Render/Text/draw_text_win.cpp
Render/Text/draw_text_win.h
Render/Text/draw_text_uwp.cpp
Render/Text/draw_text_uwp.h
Audio/AudioBackend.h
System/Display.cpp
System/Display.h
System/Application.h
System/System.h
System/NativeApp.h
System/Request.cpp
System/Request.h
System/OSD.cpp
System/OSD.h
Thread/Channel.h
Thread/ParallelLoop.cpp
Thread/ParallelLoop.h
Thread/Promise.h
Thread/ThreadUtil.cpp
Thread/ThreadUtil.h
Thread/ThreadManager.cpp
Thread/ThreadManager.h
UI/AsyncImageFileView.cpp
UI/AsyncImageFileView.h
UI/Root.cpp
UI/Root.h
UI/Screen.cpp
UI/Screen.h
UI/UI.cpp
UI/UI.h
UI/Context.cpp
UI/Context.h
UI/IconCache.cpp
UI/IconCache.h
UI/UIScreen.cpp
UI/UIScreen.h
UI/Notice.cpp
UI/Notice.h
UI/Tween.cpp
UI/Tween.h
UI/View.cpp
UI/View.h
UI/ViewGroup.cpp
UI/ViewGroup.h
UI/ScrollView.cpp
UI/ScrollView.h
UI/TabHolder.cpp
UI/TabHolder.h
UI/PopupScreens.cpp
UI/PopupScreens.h
BitScan.h
BitSet.h
Buffer.h
Buffer.cpp
CodeBlock.h
Common.h
CommonFuncs.h
CommonTypes.h
DbgNew.h
FakeEmitter.h
FakeCPUDetect.cpp
ExceptionHandlerSetup.cpp
ExceptionHandlerSetup.h
GhidraClient.h
GhidraClient.cpp
Log.h
Log.cpp
Log/ConsoleListener.cpp
Log/ConsoleListener.h
Log/LogManager.cpp
Log/LogManager.h
LogReporting.cpp
LogReporting.h
MemArenaAndroid.cpp
MemArenaDarwin.cpp
MemArenaPosix.cpp
MemArenaWin32.cpp
MemArenaHorizon.cpp
MemArena.h
MemoryUtil.cpp
MemoryUtilHorizon.cpp
MemoryUtil.h
OSVersion.cpp
OSVersion.h
StringUtils.cpp
StringUtils.h
SysError.h
SysError.cpp
TimeUtil.cpp
TimeUtil.h
${CMAKE_SOURCE_DIR}/ext/jpge/jpgd.cpp
${CMAKE_SOURCE_DIR}/ext/jpge/jpgd.h
${CMAKE_SOURCE_DIR}/ext/jpge/jpge.cpp
${CMAKE_SOURCE_DIR}/ext/jpge/jpge.h
)
if(LIBRETRO)
target_include_directories(Common PRIVATE ${CMAKE_SOURCE_DIR}/libretro/libretro-common/include)
endif()
setup_target_project(Common Common)
if(IOS)
target_compile_definitions(Common PUBLIC GLES_SILENCE_DEPRECATION)
endif()
target_link_libraries(Common Ext::Snappy cpu_features)
if(SDL_LIB_TARGET AND TARGET SDL3::Headers)
target_link_libraries(Common SDL3::Headers)
endif()
if(NOT LIBRETRO)
target_link_libraries(Common imgui)
endif()
if(ARM64)
if(ANDROID)
target_link_libraries(Common adrenotools)
endif()
endif()
target_compile_definitions(Common PRIVATE Z7_CRC_NUM_TABLES=1)
if(TARGET Ext::GLEW)
target_link_libraries(Common Ext::GLEW)
endif()
if(WIN32)
target_link_libraries(Common winmm dsound dxguid d2d1 dwrite d3d11 Version)
endif()
target_link_libraries(Common ${LIBZIP_LIBRARY} 7zip ${PNG_LIBRARIES} basis_universal ${ZLIB_LIBRARY} pugixml vma gason udis86 ${RT_LIB} ${ATOMIC_LIB})
# ZIMLoad.cpp/ZIMSave.cpp, Serializer.cpp, and Render/TextureAtlas.cpp call directly into zstd.
if(USE_SYSTEM_ZSTD)
target_include_directories(Common PRIVATE ${ZSTD_INCLUDE_DIR})
target_link_libraries(Common ${ZSTD_LIBRARY})
else()
target_link_libraries(Common libzstd_static)
endif()
# Common/GPU/ShaderTranslation.cpp and Common/GPU/Vulkan/VulkanContext.cpp call directly into
# glslang/spirv-cross, so Common needs to declare this dependency itself rather than relying on
# some downstream consumer happening to also link it (that was the previous, fragile setup: this
# was only linked to the old combined "core" target, which happened to always be linked after
# Common everywhere it mattered).
target_link_libraries(Common ${GlslangLibs})
+6
View File
@@ -20,6 +20,12 @@
#ifndef UNICODE
#error Win32 build requires a unicode build
#endif
#elif defined(__APPLE__)
// _POSIX_SOURCE alone restricts Darwin's libc headers to POSIX.1-1990 declarations,
// which predates fseeko/ftello/ftruncate (POSIX.1-2001+) and hides them entirely -
// unlike glibc, Darwin doesn't fall back to a broader feature set here.
#define _DARWIN_C_SOURCE
#define _LARGE_TIME_API
#else
#define _POSIX_SOURCE
#define _LARGE_TIME_API
+803
View File
@@ -0,0 +1,803 @@
set(CoreExtra)
set(aemu_postoffice
${CMAKE_SOURCE_DIR}/ext/aemu_postoffice/client/postoffice.c
${CMAKE_SOURCE_DIR}/ext/aemu_postoffice/client/postoffice_mem_stdc.c
${CMAKE_SOURCE_DIR}/ext/aemu_postoffice/client/mutex_impl_cpp.cpp
${CMAKE_SOURCE_DIR}/ext/aemu_postoffice/client/delay_impl_cpp.cpp
${CMAKE_SOURCE_DIR}/ext/aemu_postoffice/client/log_impl_ppsspp.cpp
)
if(WIN32)
list(APPEND aemu_postoffice
${CMAKE_SOURCE_DIR}/ext/aemu_postoffice/client/sock_impl_windows.c
)
endif()
if(LINUX OR ANDROID OR MACOSX OR IOS OR BSD)
list(APPEND aemu_postoffice
${CMAKE_SOURCE_DIR}/ext/aemu_postoffice/client/sock_impl_linux.c
)
endif()
list(APPEND CoreExtra
MIPS/IR/IRAnalysis.cpp
MIPS/IR/IRAnalysis.h
MIPS/IR/IRCompALU.cpp
MIPS/IR/IRCompBranch.cpp
MIPS/IR/IRCompFPU.cpp
MIPS/IR/IRCompLoadStore.cpp
MIPS/IR/IRCompVFPU.cpp
MIPS/IR/IRFrontend.cpp
MIPS/IR/IRFrontend.h
MIPS/IR/IRInst.cpp
MIPS/IR/IRInst.h
MIPS/IR/IRInterpreter.cpp
MIPS/IR/IRInterpreter.h
MIPS/IR/IRJit.cpp
MIPS/IR/IRJit.h
MIPS/IR/IRNativeCommon.cpp
MIPS/IR/IRNativeCommon.h
MIPS/IR/IRPassSimplify.cpp
MIPS/IR/IRPassSimplify.h
MIPS/IR/IRRegCache.cpp
MIPS/IR/IRRegCache.h
)
list(APPEND CoreExtra
MIPS/ARM/ArmAsm.cpp
MIPS/ARM/ArmCompALU.cpp
MIPS/ARM/ArmCompBranch.cpp
MIPS/ARM/ArmCompFPU.cpp
MIPS/ARM/ArmCompLoadStore.cpp
MIPS/ARM/ArmCompVFPU.cpp
MIPS/ARM/ArmCompReplace.cpp
MIPS/ARM/ArmJit.cpp
MIPS/ARM/ArmJit.h
MIPS/ARM/ArmRegCache.cpp
MIPS/ARM/ArmRegCache.h
MIPS/ARM/ArmRegCacheFPU.cpp
MIPS/ARM/ArmRegCacheFPU.h
)
list(APPEND CoreExtra
MIPS/ARM64/Arm64Asm.cpp
MIPS/ARM64/Arm64CompALU.cpp
MIPS/ARM64/Arm64CompBranch.cpp
MIPS/ARM64/Arm64CompFPU.cpp
MIPS/ARM64/Arm64CompLoadStore.cpp
MIPS/ARM64/Arm64CompVFPU.cpp
MIPS/ARM64/Arm64CompReplace.cpp
MIPS/ARM64/Arm64Jit.cpp
MIPS/ARM64/Arm64Jit.h
MIPS/ARM64/Arm64RegCache.cpp
MIPS/ARM64/Arm64RegCache.h
MIPS/ARM64/Arm64RegCacheFPU.cpp
MIPS/ARM64/Arm64RegCacheFPU.h
MIPS/ARM64/Arm64IRAsm.cpp
MIPS/ARM64/Arm64IRCompALU.cpp
MIPS/ARM64/Arm64IRCompBranch.cpp
MIPS/ARM64/Arm64IRCompFPU.cpp
MIPS/ARM64/Arm64IRCompLoadStore.cpp
MIPS/ARM64/Arm64IRCompSystem.cpp
MIPS/ARM64/Arm64IRCompVec.cpp
MIPS/ARM64/Arm64IRJit.cpp
MIPS/ARM64/Arm64IRJit.h
MIPS/ARM64/Arm64IRRegCache.cpp
MIPS/ARM64/Arm64IRRegCache.h
Util/DisArm64.cpp
)
list(APPEND CoreExtra
MIPS/x86/Asm.cpp
MIPS/x86/CompALU.cpp
MIPS/x86/CompBranch.cpp
MIPS/x86/CompFPU.cpp
MIPS/x86/CompLoadStore.cpp
MIPS/x86/CompVFPU.cpp
MIPS/x86/CompReplace.cpp
MIPS/x86/Jit.cpp
MIPS/x86/Jit.h
MIPS/x86/JitSafeMem.cpp
MIPS/x86/JitSafeMem.h
MIPS/x86/RegCache.cpp
MIPS/x86/RegCache.h
MIPS/x86/RegCacheFPU.cpp
MIPS/x86/RegCacheFPU.h
MIPS/x86/X64IRAsm.cpp
MIPS/x86/X64IRCompALU.cpp
MIPS/x86/X64IRCompBranch.cpp
MIPS/x86/X64IRCompFPU.cpp
MIPS/x86/X64IRCompLoadStore.cpp
MIPS/x86/X64IRCompSystem.cpp
MIPS/x86/X64IRCompVec.cpp
MIPS/x86/X64IRJit.cpp
MIPS/x86/X64IRJit.h
MIPS/x86/X64IRRegCache.cpp
MIPS/x86/X64IRRegCache.h
)
list(APPEND CoreExtra
MIPS/RiscV/RiscVAsm.cpp
MIPS/RiscV/RiscVCompALU.cpp
MIPS/RiscV/RiscVCompBranch.cpp
MIPS/RiscV/RiscVCompFPU.cpp
MIPS/RiscV/RiscVCompLoadStore.cpp
MIPS/RiscV/RiscVCompSystem.cpp
MIPS/RiscV/RiscVCompVec.cpp
MIPS/RiscV/RiscVJit.cpp
MIPS/RiscV/RiscVJit.h
MIPS/RiscV/RiscVRegCache.cpp
MIPS/RiscV/RiscVRegCache.h
)
list(APPEND CoreExtra
MIPS/LoongArch64/LoongArch64Asm.cpp
MIPS/LoongArch64/LoongArch64CompALU.cpp
MIPS/LoongArch64/LoongArch64CompBranch.cpp
MIPS/LoongArch64/LoongArch64CompFPU.cpp
MIPS/LoongArch64/LoongArch64CompLoadStore.cpp
MIPS/LoongArch64/LoongArch64CompSystem.cpp
MIPS/LoongArch64/LoongArch64CompVec.cpp
MIPS/LoongArch64/LoongArch64Jit.cpp
MIPS/LoongArch64/LoongArch64Jit.h
MIPS/LoongArch64/LoongArch64RegCache.cpp
MIPS/LoongArch64/LoongArch64RegCache.h
)
if(NOT MOBILE_DEVICE)
list(APPEND CoreExtra
AVIDump.cpp
AVIDump.h
WaveFile.cpp
WaveFile.h
)
endif()
if((MACOSX OR IOS) AND NOT LIBRETRO)
list(APPEND CoreExtra
Util/DarwinFileSystemServices.mm
Util/DarwinFileSystemServices.h)
endif()
set(CmdLine)
if(NOT LIBRETRO)
list(APPEND CmdLine
CmdLine.cpp
CmdLine.h
)
endif()
# miniUPnPc integration (MiniUPnPc supposed to works on any POSIX system, not sure if some of these are redundant/not needed tho)
#
# The add_compile_definitions()/target_link_libraries(Core ...) split below looks awkward, but it's
# required: add_compile_definitions() only affects targets created *after* the call, and
# target_link_libraries(Core ...) requires the Core target to already exist. So the defines have to
# land before add_library(Core STATIC ...) further up this file, while linking miniupnpc into Core
# has to happen after it. Previously this whole block sat after add_library(Core STATIC ...), which
# meant Core/Util/PortManager.cpp (built as part of that same add_library call) never actually saw
# WITH_UPNP or any of the other defines below - UPnP support was silently compiled out everywhere.
if(USE_MINIUPNPC)
if(USE_SYSTEM_MINIUPNPC)
find_package(MINIUPNPC REQUIRED)
add_compile_definitions(WITH_UPNP USE_SYSTEM_MINIUPNPC)
else()
set (MINIUPNPC_VERSION 2.2) # used by miniupnpcstrings.h.cmake
set (MINIUPNPC_API_VERSION 18)
option(UPNPC_BUILD_STATIC "Build static library" TRUE)
option(NO_GETADDRINFO "Define NO_GETADDRINFO" FALSE)
mark_as_advanced(NO_GETADDRINFO)
if (NO_GETADDRINFO)
add_compile_definitions(NO_GETADDRINFO)
endif()
if (NOT WIN32)
add_compile_definitions (MINIUPNPC_SET_SOCKET_TIMEOUT)
add_compile_definitions (_BSD_SOURCE _DEFAULT_SOURCE _POSIX_C_SOURCE=200112L)
endif()
if (MACOSX)
add_compile_definitions (_DARWIN_C_SOURCE)
endif()
if(WIN32)
add_compile_definitions(WIN32 MINIUPNP_EXPORTS)
else()
add_compile_options(-fPIC)
endif()
add_compile_definitions(WITH_UPNP MINIUPNP_STATICLIB)
set(MINIUPNP_DIR "${CMAKE_SOURCE_DIR}/ext/miniupnp/miniupnpc")
include_directories(${CMAKE_CURRENT_BINARY_DIR})
include_directories(${CMAKE_SOURCE_DIR}/ext/miniupnp/miniupnpc/src)
include_directories(${CMAKE_SOURCE_DIR}/ext/miniupnp/miniupnpc/include)
configure_file(${MINIUPNP_DIR}/miniupnpcstrings.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/miniupnpcstrings.h) # by default miniupnp repo doesn't contains miniupnpcstrings.h and need to be generated
set(MINIUPNPC_SOURCES
# the needed bits of miniupnpc (no python module, no tests, no cli)
${MINIUPNP_DIR}/src/addr_is_reserved.c
${MINIUPNP_DIR}/src/connecthostport.c
${MINIUPNP_DIR}/src/igd_desc_parse.c
${MINIUPNP_DIR}/src/minisoap.c
${MINIUPNP_DIR}/src/minissdpc.c
${MINIUPNP_DIR}/src/miniupnpc.c
#${MINIUPNP_DIR}/miniupnpcmodule.c
${MINIUPNP_DIR}/src/miniwget.c
${MINIUPNP_DIR}/src/minixml.c
${MINIUPNP_DIR}/src/portlistingparse.c
${MINIUPNP_DIR}/src/receivedata.c
#${MINIUPNP_DIR}/upnpc.c # causing an error due to already existing _main()
${MINIUPNP_DIR}/src/upnpcommands.c
${MINIUPNP_DIR}/src/upnpdev.c
${MINIUPNP_DIR}/src/upnperrors.c
${MINIUPNP_DIR}/src/upnpreplyparse.c
${CMAKE_CURRENT_BINARY_DIR}/miniupnpcstrings.h
)
if (NOT WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL "AmigaOS")
#set(MINIUPNPC_SOURCES ${MINIUPNPC_SOURCES} minissdpc.c) # causing an error due to duplication in MINIUPNPC_SOURCES?
endif()
if (WIN32)
set_source_files_properties(${MINIUPNPC_SOURCES} PROPERTIES COMPILE_DEFINITIONS "MINIUPNP_STATICLIB;MINIUPNP_EXPORTS")
list(PREPEND LDLIBS ws2_32 iphlpapi)
#elseif (CMAKE_SYSTEM_NAME STREQUAL "Solaris")
# find_library (SOCKET_LIBRARY NAMES socket)
# find_library (NSL_LIBRARY NAMES nsl)
# find_library (RESOLV_LIBRARY NAMES resolv)
# set (LDLIBS ${SOCKET_LIBRARY} ${NSL_LIBRARY} ${RESOLV_LIBRARY} ${LDLIBS})
endif()
endif()
endif()
add_library(Core STATIC
${CoreExtra}
${CmdLine}
Config.cpp
Config.h
ConfigSettings.cpp
ConfigSettings.h
ConfigValues.h
ControlMapper.cpp
ControlMapper.h
Core.cpp
Core.h
Compatibility.cpp
Compatibility.h
CoreParameter.h
CoreTiming.cpp
CoreTiming.h
CwCheat.cpp
CwCheat.h
FrameTiming.cpp
FrameTiming.h
HDRemaster.cpp
HDRemaster.h
Instance.cpp
Instance.h
KeyMap.cpp
KeyMap.h
KeyMapDefaults.cpp
KeyMapDefaults.h
LuaContext.cpp
LuaContext.h
RetroAchievements.h
RetroAchievements.cpp
TiltEventProcessor.h
TiltEventProcessor.cpp
WebServer.cpp
WebServer.h
Debugger/Breakpoints.cpp
Debugger/Breakpoints.h
Debugger/DebugInterface.h
Debugger/MemBlockInfo.cpp
Debugger/MemBlockInfo.h
Debugger/SymbolMap.cpp
Debugger/SymbolMap.h
Debugger/Watch.h
Debugger/DisassemblyManager.cpp
Debugger/DisassemblyManager.h
Debugger/WebSocket.cpp
Debugger/WebSocket.h
Debugger/WebSocket/BreakpointSubscriber.cpp
Debugger/WebSocket/BreakpointSubscriber.h
Debugger/WebSocket/CPUCoreSubscriber.cpp
Debugger/WebSocket/CPUCoreSubscriber.h
Debugger/WebSocket/DisasmSubscriber.cpp
Debugger/WebSocket/DisasmSubscriber.h
Debugger/WebSocket/GameBroadcaster.cpp
Debugger/WebSocket/GameBroadcaster.h
Debugger/WebSocket/GameSubscriber.cpp
Debugger/WebSocket/GameSubscriber.h
Debugger/WebSocket/ClientConfigSubscriber.cpp
Debugger/WebSocket/ClientConfigSubscriber.h
Debugger/WebSocket/GPUBufferSubscriber.cpp
Debugger/WebSocket/GPUBufferSubscriber.h
Debugger/WebSocket/GPURecordSubscriber.cpp
Debugger/WebSocket/GPURecordSubscriber.h
Debugger/WebSocket/GPUStatsSubscriber.cpp
Debugger/WebSocket/GPUStatsSubscriber.h
Debugger/WebSocket/HLESubscriber.cpp
Debugger/WebSocket/HLESubscriber.h
Debugger/WebSocket/InputBroadcaster.cpp
Debugger/WebSocket/InputBroadcaster.h
Debugger/WebSocket/InputSubscriber.cpp
Debugger/WebSocket/InputSubscriber.h
Debugger/WebSocket/LogBroadcaster.cpp
Debugger/WebSocket/LogBroadcaster.h
Debugger/WebSocket/MemoryInfoSubscriber.cpp
Debugger/WebSocket/MemoryInfoSubscriber.h
Debugger/WebSocket/MemorySubscriber.cpp
Debugger/WebSocket/MemorySubscriber.h
Debugger/WebSocket/ReplaySubscriber.cpp
Debugger/WebSocket/ReplaySubscriber.h
Debugger/WebSocket/SteppingBroadcaster.cpp
Debugger/WebSocket/SteppingBroadcaster.h
Debugger/WebSocket/SteppingSubscriber.cpp
Debugger/WebSocket/SteppingSubscriber.h
Debugger/WebSocket/WebSocketUtils.cpp
Debugger/WebSocket/WebSocketUtils.h
Dialog/PSPDialog.cpp
Dialog/PSPDialog.h
Dialog/PSPGamedataInstallDialog.cpp
Dialog/PSPGamedataInstallDialog.h
Dialog/PSPMsgDialog.cpp
Dialog/PSPMsgDialog.h
Dialog/PSPNetconfDialog.cpp
Dialog/PSPNetconfDialog.h
Dialog/PSPNpSigninDialog.cpp
Dialog/PSPNpSigninDialog.h
Dialog/PSPOskDialog.cpp
Dialog/PSPOskDialog.h
Dialog/PSPOskConstants.cpp
Dialog/PSPOskConstants.h
Dialog/PSPPlaceholderDialog.cpp
Dialog/PSPPlaceholderDialog.h
Dialog/PSPSaveDialog.cpp
Dialog/PSPSaveDialog.h
Dialog/PSPScreenshotDialog.cpp
Dialog/PSPScreenshotDialog.h
Dialog/SavedataParam.cpp
Dialog/SavedataParam.h
ELF/ElfReader.cpp
ELF/ElfReader.h
ELF/PSPElfTypes.h
ELF/PBPReader.cpp
ELF/PBPReader.h
ELF/PrxDecrypter.cpp
ELF/PrxDecrypter.h
ELF/ParamSFO.cpp
ELF/ParamSFO.h
EmuThread.cpp
EmuThread.h
FFMPEGCompat.h
FileSystems/tlzrc.cpp
FileSystems/BlobFileSystem.cpp
FileSystems/BlobFileSystem.h
FileSystems/BlockDevices.cpp
FileSystems/BlockDevices.h
FileSystems/DirectoryFileSystem.cpp
FileSystems/DirectoryFileSystem.h
FileSystems/FileSystem.h
FileSystems/FileSystem.cpp
FileSystems/ISOFileSystem.cpp
FileSystems/ISOFileSystem.h
FileSystems/MetaFileSystem.cpp
FileSystems/MetaFileSystem.h
FileSystems/VirtualDiscFileSystem.cpp
FileSystems/VirtualDiscFileSystem.h
Font/PGF.cpp
Font/PGF.h
HLE/FunctionWrappers.h
HLE/HLE.cpp
HLE/HLE.h
HLE/ReplaceTables.cpp
HLE/ReplaceTables.h
HLE/HLEHelperThread.cpp
HLE/HLEHelperThread.h
HLE/HLETables.cpp
HLE/HLETables.h
HLE/KernelWaitHelpers.h
HLE/PSPThreadContext.h
HLE/KUBridge.h
HLE/KUBridge.cpp
HLE/Plugins.h
HLE/Plugins.cpp
HLE/ThreadQueueList.h
HLE/__sceAudio.cpp
HLE/__sceAudio.h
HLE/sceAdler.cpp
HLE/sceAdler.h
HLE/AtracBase.h
HLE/AtracCtx.cpp
HLE/AtracCtx.h
HLE/AtracCtx2.cpp
HLE/AtracCtx2.h
HLE/NetInetConstants.cpp
HLE/NetInetConstants.h
HLE/SocketManager.cpp
HLE/SocketManager.h
HLE/sceAtrac.cpp
HLE/sceAtrac.h
HLE/sceAudio.cpp
HLE/sceAudiocodec.cpp
HLE/sceAudiocodec.h
HLE/sceAudioRouting.cpp
HLE/sceAudioRouting.h
HLE/sceAudio.h
HLE/sceCcc.h
HLE/sceCcc.cpp
HLE/sceChnnlsv.cpp
HLE/sceChnnlsv.h
HLE/sceCtrl.cpp
HLE/sceCtrl.h
HLE/sceDeflt.cpp
HLE/sceDeflt.h
HLE/sceDisplay.cpp
HLE/sceDisplay.h
HLE/sceDmac.cpp
HLE/sceDmac.h
HLE/sceG729.cpp
HLE/sceG729.h
HLE/sceGameUpdate.cpp
HLE/sceGameUpdate.h
HLE/sceGe.cpp
HLE/sceGe.h
HLE/sceFont.cpp
HLE/sceFont.h
HLE/sceHeap.cpp
HLE/sceHeap.h
HLE/sceHprm.cpp
HLE/sceHprm.h
HLE/sceHttp.cpp
HLE/sceHttp.h
HLE/sceImpose.cpp
HLE/sceImpose.h
HLE/sceIo.cpp
HLE/sceIo.h
HLE/sceJpeg.cpp
HLE/sceJpeg.h
HLE/sceKernel.cpp
HLE/sceKernel.h
HLE/sceKernelAlarm.cpp
HLE/sceKernelAlarm.h
HLE/sceKernelEventFlag.cpp
HLE/sceKernelEventFlag.h
HLE/sceKernelHeap.cpp
HLE/sceKernelHeap.h
HLE/sceKernelInterrupt.cpp
HLE/sceKernelInterrupt.h
HLE/sceKernelMbx.cpp
HLE/sceKernelMbx.h
HLE/sceKernelMemory.cpp
HLE/sceKernelMemory.h
HLE/sceKernelModule.cpp
HLE/sceKernelModule.h
HLE/sceKernelMsgPipe.cpp
HLE/sceKernelMsgPipe.h
HLE/sceKernelMutex.cpp
HLE/sceKernelMutex.h
HLE/sceKernelSemaphore.cpp
HLE/sceKernelSemaphore.h
HLE/sceKernelThread.cpp
HLE/sceKernelThread.h
HLE/sceKernelTime.cpp
HLE/sceKernelTime.h
HLE/sceKernelVTimer.cpp
HLE/sceKernelVTimer.h
HLE/sceMpeg.cpp
HLE/sceMpeg.h
HLE/sceNet.cpp
HLE/sceNet.h
HLE/sceNet_lib.cpp
HLE/sceNet_lib.h
HLE/NetAdhocCommon.cpp
HLE/NetAdhocCommon.h
HLE/sceNetAdhoc.cpp
HLE/sceNetAdhoc.h
${aemu_postoffice}
HLE/sceNetAdhocMatching.cpp
HLE/sceNetAdhocMatching.h
HLE/sceNetInet.cpp
HLE/sceNetInet.h
HLE/sceNetApctl.cpp
HLE/sceNetApctl.h
HLE/sceNetResolver.cpp
HLE/sceNetResolver.h
HLE/proAdhoc.h
HLE/proAdhoc.cpp
HLE/proAdhocServer.h
HLE/proAdhocServer.cpp
HLE/sceOpenPSID.cpp
HLE/sceOpenPSID.h
HLE/sceP3da.cpp
HLE/sceP3da.h
HLE/sceMt19937.cpp
HLE/sceMt19937.h
HLE/sceMd5.cpp
HLE/sceMd5.h
HLE/sceAac.cpp
HLE/sceAac.h
HLE/sceMp4.cpp
HLE/sceMp4.h
HLE/sceMp3.cpp
HLE/sceMp3.h
HLE/sceParseHttp.cpp
HLE/sceParseHttp.h
HLE/sceParseUri.cpp
HLE/sceParseUri.h
HLE/scePower.cpp
HLE/scePower.h
HLE/scePsmf.cpp
HLE/scePsmf.h
HLE/sceReg.cpp
HLE/sceReg.h
HLE/sceRtc.cpp
HLE/sceRtc.h
HLE/sceSas.cpp
HLE/sceSas.h
HLE/sceSfmt19937.cpp
HLE/sceSfmt19937.h
HLE/sceSha256.cpp
HLE/sceSha256.h
HLE/sceSircs.cpp
HLE/sceSircs.h
HLE/sceSsl.cpp
HLE/sceSsl.h
HLE/sceUmd.cpp
HLE/sceUmd.h
HLE/sceUsb.cpp
HLE/sceUsb.h
HLE/sceUsbAcc.cpp
HLE/sceUsbAcc.h
HLE/sceUsbCam.cpp
HLE/sceUsbCam.h
HLE/sceUsbGps.cpp
HLE/sceUsbGps.h
HLE/sceUsbMic.cpp
HLE/sceUsbMic.h
HLE/sceUtility.cpp
HLE/sceUtility.h
HLE/sceVaudio.cpp
HLE/sceVaudio.h
HLE/scePspNpDrm_user.cpp
HLE/scePspNpDrm_user.h
HLE/sceNp.cpp
HLE/sceNp.h
HLE/sceNp2.cpp
HLE/sceNp2.h
HLE/scePauth.cpp
HLE/scePauth.h
HW/SimpleAudioDec.cpp
HW/SimpleAudioDec.h
HW/Atrac3Standalone.cpp
HW/Atrac3Standalone.h
HW/SimpleAudioDec.h
HW/AsyncIOManager.cpp
HW/AsyncIOManager.h
HW/BufferQueue.cpp
HW/BufferQueue.h
HW/Camera.cpp
HW/Camera.h
HW/Display.cpp
HW/Display.h
HW/GranularMixer.cpp
HW/GranularMixer.h
HW/MediaEngine.cpp
HW/MediaEngine.h
HW/MpegDemux.cpp
HW/MpegDemux.h
HW/MemoryStick.cpp
HW/MemoryStick.h
HW/SasAudio.cpp
HW/SasAudio.h
HW/SasReverb.cpp
HW/SasReverb.h
HW/StereoResampler.cpp
HW/StereoResampler.h
Loaders.cpp
Loaders.h
FileLoaders/CachingFileLoader.cpp
FileLoaders/CachingFileLoader.h
FileLoaders/DiskCachingFileLoader.cpp
FileLoaders/DiskCachingFileLoader.h
FileLoaders/HTTPFileLoader.cpp
FileLoaders/HTTPFileLoader.h
FileLoaders/LocalFileLoader.cpp
FileLoaders/LocalFileLoader.h
FileLoaders/RamCachingFileLoader.cpp
FileLoaders/RamCachingFileLoader.h
FileLoaders/RetryingFileLoader.cpp
FileLoaders/RetryingFileLoader.h
FileLoaders/ZipFileLoader.cpp
FileLoaders/ZipFileLoader.h
MIPS/MIPS.cpp
MIPS/MIPS.h
MIPS/MIPSAnalyst.cpp
MIPS/MIPSAnalyst.h
MIPS/MIPSCodeUtils.cpp
MIPS/MIPSCodeUtils.h
MIPS/MIPSDebugInterface.cpp
MIPS/MIPSDebugInterface.h
MIPS/MIPSDis.cpp
MIPS/MIPSDis.h
MIPS/MIPSDisVFPU.cpp
MIPS/MIPSDisVFPU.h
MIPS/MIPSInt.cpp
MIPS/MIPSInt.h
MIPS/MIPSIntVFPU.cpp
MIPS/MIPSIntVFPU.h
MIPS/MIPSStackWalk.cpp
MIPS/MIPSStackWalk.h
MIPS/MIPSTables.cpp
MIPS/MIPSTables.h
MIPS/MIPSVFPUUtils.cpp
MIPS/MIPSVFPUUtils.h
MIPS/MIPSVFPUFallbacks.cpp
MIPS/MIPSVFPUFallbacks.h
MIPS/MIPSAsm.cpp
MIPS/MIPSAsm.h
MIPS/MIPSTracer.cpp
MIPS/MIPSTracer.h
MIPS/JitCommon/JitCommon.cpp
MIPS/JitCommon/JitCommon.h
MIPS/JitCommon/JitBlockCache.cpp
MIPS/JitCommon/JitBlockCache.h
MIPS/JitCommon/JitState.cpp
MIPS/JitCommon/JitState.h
Util/DisArm64.h
Util/DisArm64.cpp
MIPS/fake/FakeJit.cpp
MIPS/fake/FakeJit.h
MemFault.cpp
MemFault.h
MemMap.cpp
MemMap.h
MemMapFunctions.cpp
MemMapHelpers.h
PSPLoaders.cpp
PSPLoaders.h
Reporting.cpp
Reporting.h
Replay.cpp
Replay.h
SaveState.cpp
SaveState.h
SaveStateRewind.cpp
SaveStateRewind.h
Screenshot.cpp
Screenshot.h
System.cpp
System.h
Util/AtracTrack.cpp
Util/AtracTrack.h
Util/AudioFormat.cpp
Util/AudioFormat.h
Util/GameManager.cpp
Util/GameManager.h
Util/MemStick.cpp
Util/MemStick.h
Util/GameDB.cpp
Util/GameDB.h
Util/PathUtil.cpp
Util/PathUtil.h
Util/PortManager.cpp
Util/PortManager.h
Util/BlockAllocator.cpp
Util/BlockAllocator.h
Util/PPGeDraw.cpp
Util/PPGeDraw.h
Util/RecentFiles.cpp
Util/RecentFiles.h
Util/VideoPlayer.cpp
Util/VideoPlayer.h
${CMAKE_SOURCE_DIR}/ext/disarm.cpp
${CMAKE_SOURCE_DIR}/ext/disarm.h
${CMAKE_SOURCE_DIR}/ext/riscv-disas.cpp
${CMAKE_SOURCE_DIR}/ext/riscv-disas.h
${CMAKE_SOURCE_DIR}/ext/loongarch-disasm.cpp
${CMAKE_SOURCE_DIR}/ext/loongarch-disasm.h
${CMAKE_BINARY_DIR}/git-version.cpp
)
if((MACOSX OR IOS) AND NOT LIBRETRO)
set_source_files_properties(Util/DarwinFileSystemServices.mm
PROPERTIES COMPILE_FLAGS -fobjc-arc)
endif()
if(LIBRETRO)
target_include_directories(Core PRIVATE ${CMAKE_SOURCE_DIR}/libretro/libretro-common/include)
endif()
set(CoreExtraLibs)
if(ANDROID)
list(APPEND CoreExtraLibs android)
if(X86_64)
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-Bsymbolic")
endif()
endif()
list(APPEND CoreExtraLibs armips)
target_link_libraries(Core GPU Common chdr kirk cityhash sfmt19937 xbrz xxhash rcheevos minimp3 at3_standalone lua
${CoreExtraLibs} ${CMAKE_DL_LIBS})
# Winsock
if(WIN32)
target_link_libraries(Core ws2_32)
endif()
if(NOT HTTPS_NOT_AVAILABLE)
target_link_libraries(Core naett)
endif()
target_compile_features(Core PUBLIC cxx_std_17)
if(FFmpeg_FOUND)
target_compile_definitions(Core PRIVATE USE_FFMPEG=1)
if (HAVE_LIBAVCODEC_CONST_AVCODEC)
target_compile_definitions(Core PRIVATE HAVE_LIBAVCODEC_CONST_AVCODEC=1)
endif()
set_target_properties(Core PROPERTIES NO_SYSTEM_FROM_IMPORTED true)
target_include_directories(Core BEFORE PUBLIC ${FFmpeg_INCLUDE_avcodec} ${FFmpeg_INCLUDE_avformat})
target_link_libraries(Core
FFmpeg::avcodec
FFmpeg::avformat
FFmpeg::avutil
FFmpeg::swresample
FFmpeg::swscale
${ZLIB_LIBRARY}
)
elseif(BUILD_BUNDLED_FFMPEG)
target_compile_definitions(Core PRIVATE USE_FFMPEG=1)
set_target_properties(Core PROPERTIES NO_SYSTEM_FROM_IMPORTED true)
target_link_libraries(Core
avcodec
avformat
avutil
swresample
swscale
${ZLIB_LIBRARY}
)
endif()
# Discord integration
if(USE_DISCORD AND NOT IOS AND NOT LIBRETRO)
target_link_libraries(Core discord-rpc)
endif()
# The other half of the miniUPnPc integration above: that half sets up the compile definitions
# (which had to happen before add_library(Core STATIC ...)), this half builds/links the library
# (which needs the Core target to already exist).
if(USE_MINIUPNPC)
if(USE_SYSTEM_MINIUPNPC)
target_include_directories(Core PRIVATE ${MINIUPNP_INCLUDE_DIR})
target_link_libraries(Core ${MINIUPNP_LIBRARY})
elseif(UPNPC_BUILD_STATIC)
add_library(miniupnpc STATIC ${MINIUPNPC_SOURCES})
target_link_libraries(Core miniupnpc ${LDLIBS})
set(UPNPC_LIBRARY miniupnpc)
if (MSVC)
# Suppress noise warnings
target_compile_definitions(miniupnpc PRIVATE _CRT_SECURE_NO_WARNINGS _WINSOCK_DEPRECATED_NO_WARNINGS)
endif()
if (WIN32)
target_link_libraries(miniupnpc ws2_32)
endif()
endif()
endif()
setup_target_project(Core Core)
# Generate git-version at build time.
add_custom_target(GitVersion DEPENDS something_that_never_exists)
set(WIN_VERSION_CMD "")
if (WIN32)
set(WIN_VERSION_CMD COMMAND ${CMAKE_SOURCE_DIR}/Windows/git-version-gen.cmd PPSSPPWindows)
endif()
add_custom_command(OUTPUT something_that_never_exists
COMMAND ${CMAKE_COMMAND} -DSOURCE_DIR=${CMAKE_SOURCE_DIR}
-DOUTPUT_DIR=${CMAKE_BINARY_DIR}
-P ${CMAKE_SOURCE_DIR}/git-version.cmake
${WIN_VERSION_CMD})
set_source_files_properties(${CMAKE_BINARY_DIR}/git-version.cpp
PROPERTIES GENERATED TRUE
SKIP_AUTOMOC ON)
add_dependencies(Core GitVersion)
+217
View File
@@ -0,0 +1,217 @@
set(GPUArch)
list(APPEND GPUArch
Common/VertexDecoderArm.cpp
Common/VertexDecoderArm64.cpp
Common/VertexDecoderX86.cpp
Software/DrawPixelX86.cpp
Software/SamplerX86.cpp
Common/VertexDecoderRiscV.cpp
Common/VertexDecoderLoongArch64.cpp
)
set(GPU_GLES
GLES/StencilBufferGLES.cpp
GLES/GPU_GLES.cpp
GLES/GPU_GLES.h
GLES/FragmentTestCacheGLES.cpp
GLES/FragmentTestCacheGLES.h
GLES/FramebufferManagerGLES.cpp
GLES/FramebufferManagerGLES.h
GLES/ShaderManagerGLES.cpp
GLES/ShaderManagerGLES.h
GLES/StateMappingGLES.cpp
GLES/StateMappingGLES.h
GLES/TextureCacheGLES.cpp
GLES/TextureCacheGLES.h
GLES/DrawEngineGLES.cpp
GLES/DrawEngineGLES.h
)
set(GPU_VULKAN
Vulkan/DebugVisVulkan.cpp
Vulkan/DebugVisVulkan.h
Vulkan/DrawEngineVulkan.cpp
Vulkan/DrawEngineVulkan.h
Vulkan/FramebufferManagerVulkan.cpp
Vulkan/FramebufferManagerVulkan.h
Vulkan/GPU_Vulkan.cpp
Vulkan/GPU_Vulkan.h
Vulkan/PipelineManagerVulkan.cpp
Vulkan/PipelineManagerVulkan.h
Vulkan/ShaderManagerVulkan.cpp
Vulkan/ShaderManagerVulkan.h
Vulkan/StateMappingVulkan.cpp
Vulkan/StateMappingVulkan.h
Vulkan/TextureCacheVulkan.cpp
Vulkan/TextureCacheVulkan.h
Vulkan/VulkanUtil.cpp
Vulkan/VulkanUtil.h
)
set(GPU_D3D11
D3D11/DrawEngineD3D11.cpp
D3D11/DrawEngineD3D11.h
D3D11/FramebufferManagerD3D11.cpp
D3D11/FramebufferManagerD3D11.h
D3D11/GPU_D3D11.cpp
D3D11/GPU_D3D11.h
D3D11/D3D11Util.cpp
D3D11/D3D11Util.h
D3D11/ShaderManagerD3D11.cpp
D3D11/ShaderManagerD3D11.h
D3D11/StateMappingD3D11.cpp
D3D11/StateMappingD3D11.h
D3D11/TextureCacheD3D11.cpp
D3D11/TextureCacheD3D11.h
)
# We build Vulkan even on Apple to avoid annoying build differences.
set(GPU_IMPLS ${GPU_GLES} ${GPU_VULKAN})
if(WIN32)
list(APPEND GPU_IMPLS ${GPU_D3D11})
endif()
set(GPU_SOURCES
${GPUArch}
${GPU_IMPLS}
${GPU_NEON}
Common/Draw2D.cpp
Common/Draw2D.h
Common/DepthBufferCommon.cpp
Common/DepthRaster.cpp
Common/DepthRaster.h
Common/TextureShaderCommon.cpp
Common/TextureShaderCommon.h
Common/DepalettizeShaderCommon.cpp
Common/DepalettizeShaderCommon.h
Common/FragmentShaderGenerator.cpp
Common/FragmentShaderGenerator.h
Common/VertexShaderGenerator.cpp
Common/VertexShaderGenerator.h
Common/FramebufferManagerCommon.cpp
Common/FramebufferManagerCommon.h
Common/GPUDebugInterface.cpp
Common/GPUDebugInterface.h
Common/GPUStateUtils.cpp
Common/GPUStateUtils.h
Common/DrawEngineCommon.cpp
Common/DrawEngineCommon.h
Common/PresentationCommon.cpp
Common/PresentationCommon.h
Common/ReinterpretFramebuffer.cpp
Common/ReinterpretFramebuffer.h
Common/ShaderId.cpp
Common/ShaderId.h
Common/ShaderUniforms.cpp
Common/ShaderUniforms.h
Common/ShaderCommon.cpp
Common/ShaderCommon.h
Common/SplineCommon.cpp
Common/SplineCommon.h
Common/StencilCommon.cpp
Common/StencilCommon.h
Common/SoftwareTransformCommon.cpp
Common/SoftwareTransformCommon.h
Common/VertexDecoderCommon.cpp
Common/VertexDecoderCommon.h
Common/VertexDecoderHandwritten.cpp
Common/VertexDecoderHandwritten.h
Common/VertexReader.h
Common/TransformCommon.cpp
Common/TransformCommon.h
Common/IndexGenerator.cpp
Common/IndexGenerator.h
Common/ImageCommon.h
Common/TextureDecoder.cpp
Common/TextureDecoder.h
Common/TextureCacheCommon.cpp
Common/TextureCacheCommon.h
Common/TextureScalerCommon.cpp
Common/TextureScalerCommon.h
Common/PostShader.cpp
Common/PostShader.h
Common/TextureReplacer.cpp
Common/TextureReplacer.h
Common/ReplacedTexture.cpp
Common/ReplacedTexture.h
Debugger/Breakpoints.cpp
Debugger/Breakpoints.h
Debugger/Debugger.cpp
Debugger/Debugger.h
Debugger/GECommandTable.cpp
Debugger/GECommandTable.h
Debugger/Playback.cpp
Debugger/Playback.h
Debugger/Record.cpp
Debugger/Record.h
Debugger/RecordFormat.h
Debugger/State.cpp
Debugger/State.h
Debugger/Stepping.cpp
Debugger/Stepping.h
ge_constants.h
GeConstants.cpp
GPUDefinitions.h
GeDisasm.cpp
GeDisasm.h
GPU.cpp
GPU.h
GPUCommon.cpp
GPUCommon.h
GPUCommonHW.cpp
GPUCommonHW.h
GPUState.cpp
GPUState.h
GPUStateSIMDUtil.h
Math3D.cpp
Math3D.h
Software/BinManager.cpp
Software/BinManager.h
Software/Clipper.cpp
Software/Clipper.h
Software/DrawPixel.cpp
Software/DrawPixel.h
Software/FuncId.cpp
Software/FuncId.h
Software/Lighting.cpp
Software/Lighting.h
Software/Rasterizer.cpp
Software/Rasterizer.h
Software/RasterizerRectangle.cpp
Software/RasterizerRectangle.h
Software/RasterizerRegCache.cpp
Software/RasterizerRegCache.h
Software/Sampler.cpp
Software/Sampler.h
Software/SoftGpu.cpp
Software/SoftGpu.h
Software/TransformUnit.cpp
Software/TransformUnit.h
)
# GPU has a genuine two-way dependency with Core (Core/System.cpp calls GPU_Init(), while
# all of GPU/ calls back into Core for Memory/Config/CoreTiming/etc). An OBJECT library's
# object files are always included wherever it's consumed rather than being lazily pulled
# from an archive, which sidesteps the GNU ld single-pass archive-ordering problem a normal
# two-way STATIC dependency would hit. Core links this PUBLICLY so consumers of Core get it.
add_library(GPU OBJECT ${GPU_SOURCES})
target_compile_features(GPU PUBLIC cxx_std_17)
if(LIBRETRO)
target_include_directories(GPU PRIVATE ${CMAKE_SOURCE_DIR}/libretro/libretro-common/include)
endif()
setup_target_project(GPU GPU)
# The only direct external dependencies of GPU/ itself (as opposed to Common/GPU/*, which
# already carries its own GL/Vulkan loader abstractions): raw gl*() calls in GPU/GLES, direct
# ZSTD_compress/decompress calls in GPU/Debugger/Record.cpp and Playback.cpp, and Playback.cpp
# also calls snappy_uncompress() directly.
target_link_libraries(GPU PUBLIC ${OPENGL_LIBRARIES} ${X11_LIBRARIES} Ext::Snappy)
if(USE_SYSTEM_ZSTD)
target_include_directories(GPU PRIVATE ${ZSTD_INCLUDE_DIR})
target_link_libraries(GPU PUBLIC ${ZSTD_LIBRARY})
else()
target_link_libraries(GPU PUBLIC libzstd_static)
endif()
+125
View File
@@ -0,0 +1,125 @@
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)
+2 -1
View File
@@ -8,7 +8,8 @@ mkdir -p build # For the final IPA & DEB file
mkdir -p build-ios
cd build-ios
rm -rf PPSSPP.app # There seems to be an existing symlink, may be from ccache? We don't want to include old stuff that might be removed to be included in the final IPA file.
# It seems xcodebuild is looking for "git-version.cpp" file inside "build-ios" directory instead of at repo's root dir.
# git-version.cpp is listed as a source file at ${CMAKE_BINARY_DIR}/git-version.cpp,
# so we pre-create it here so Xcode can find it before any script phases run.
echo "const char *PPSSPP_GIT_VERSION = \"$(git describe --always)\";" > git-version.cpp
echo "#define PPSSPP_GIT_VERSION_NO_UPDATE 1" >> git-version.cpp
# Generate exportOptions.plist for xcodebuild
+14
View File
@@ -36,6 +36,20 @@ add_subdirectory(at3_standalone)
add_subdirectory(udis86)
add_subdirectory(SPIRV-Cross-build)
add_subdirectory(rcheevos-build)
add_subdirectory(gason)
add_subdirectory(vma)
add_subdirectory(cityhash)
add_subdirectory(lzma-sdk)
add_subdirectory(basis_universal)
add_subdirectory(pugixml)
add_subdirectory(libkirk)
add_subdirectory(sfmt19937)
add_subdirectory(xbrz)
add_library(xxhash STATIC
xxhash.c
xxhash.h
)
set(FT_REQUIRE_ZLIB OFF CACHE BOOL "" FORCE)
set(FT_REQUIRE_BZIP2 OFF CACHE BOOL "" FORCE)
+28
View File
@@ -0,0 +1,28 @@
add_library(basis_universal STATIC
basisu.h
basisu_containers.h
basisu_containers_impl.h
basisu_file_headers.h
basisu_transcoder.cpp
basisu_transcoder.h
basisu_transcoder_internal.h
basisu_transcoder_tables_astc.inc
basisu_transcoder_tables_astc_0_255.inc
basisu_transcoder_tables_atc_55.inc
basisu_transcoder_tables_atc_56.inc
basisu_transcoder_tables_bc7_m5_alpha.inc
basisu_transcoder_tables_bc7_m5_color.inc
basisu_transcoder_tables_dxt1_5.inc
basisu_transcoder_tables_dxt1_6.inc
basisu_transcoder_tables_pvrtc2_45.inc
basisu_transcoder_tables_pvrtc2_alpha_33.inc
basisu_transcoder_uastc.h
)
# basisu_transcoder.cpp calls ZSTD_decompress()/ZSTD_isError() directly for KTX2 supercompression.
if(USE_SYSTEM_ZSTD)
target_include_directories(basis_universal PRIVATE ${ZSTD_INCLUDE_DIR})
target_link_libraries(basis_universal ${ZSTD_LIBRARY})
else()
target_link_libraries(basis_universal libzstd_static)
endif()
+5
View File
@@ -0,0 +1,5 @@
add_library(cityhash STATIC
city.cpp
city.h
citycrc.h
)
+4
View File
@@ -0,0 +1,4 @@
add_library(gason STATIC
gason.cpp
gason.h
)
+12 -15
View File
@@ -1,16 +1,13 @@
set(SRCS
AES.c
bn.c
ec.c
kirk_engine.c
SHA1.c
add_library(kirk STATIC
AES.c
AES.h
amctrl.c
amctrl.h
SHA1.c
SHA1.h
bn.c
ec.c
kirk_engine.c
kirk_engine.h
kirk_common.h
)
set(SRCS ${SRCS})
add_library(kirk STATIC ${SRCS})
if(UNIX)
add_definitions(-fPIC)
endif(UNIX)
+16
View File
@@ -0,0 +1,16 @@
add_library(7zip STATIC
7zArcIn.c
7zBuf.c
7zCrc.c
7zCrcOpt.c
7zDec.c
7zFile.c
7zStream.c
Bcj2.c
Bra.c
Bra86.c
CpuArch.c
Delta.c
Lzma2Dec.c
LzmaDec.c
)
+4
View File
@@ -0,0 +1,4 @@
add_library(pugixml STATIC
pugixml.cpp
pugixml.hpp
)
+8
View File
@@ -0,0 +1,8 @@
add_library(sfmt19937 STATIC
SFMT.c
SFMT.h
SFMT-common.h
SFMT-params.h
SFMT-params19937.h
)
target_compile_definitions(sfmt19937 PRIVATE SFMT_MEXP=19937)
+4
View File
@@ -0,0 +1,4 @@
add_library(vma STATIC
vk_mem_alloc.cpp
vk_mem_alloc.h
)
+4
View File
@@ -0,0 +1,4 @@
add_library(xbrz STATIC
xbrz.cpp
xbrz.h
)
+1 -1
Submodule ffmpeg updated: 18bbf9bf44...b87f7c6d52.
+1 -1
View File
@@ -42,7 +42,7 @@ if(NOT MSVC)
target_link_libraries(ppsspp_libretro "-Wl,-Bsymbolic")
endif()
endif()
target_link_libraries(ppsspp_libretro core ${CMAKE_THREAD_LIBS_INIT})
target_link_libraries(ppsspp_libretro Core ${CMAKE_THREAD_LIBS_INIT})
if(ANDROID)
target_link_libraries(ppsspp_libretro log)
endif()