Extract Common into its own CMakeLists.txt

First step of breaking up the monolithic root CMakeLists.txt: move the
add_library(Common STATIC ...) target definition, and every scattered
target_link_libraries/target_compile_definitions/target_include_directories
call touching it, into Common/CMakeLists.txt, pulled in via
add_subdirectory(Common).

Source paths are now relative to Common/ instead of prefixed with
"Common/". The two files living outside that directory (ext/jpge/*)
use ${CMAKE_SOURCE_DIR}/... instead.

include_directories(Common) stays in the root file rather than moving
into Common/CMakeLists.txt: it's a directory-scope command that needs
to affect targets defined *later* in the root file, and add_subdirectory
scope doesn't propagate upward or sideways, so moving it would have
silently broken unprefixed #includes elsewhere in the project.

add_subdirectory(Common) is placed at the point where the *last*
prerequisite variable it needs (PNG_LIBRARIES, RT_LIB, ATOMIC_LIB, etc.)
is guaranteed already set, not where the old add_library(Common ...)
used to start - some of those are resolved later in the file than
Common's original position was.

Verified with a clean ./b.sh --debug rebuild and a HEADLESS=ON
UNITTEST=ON reconfigure/build.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01PSNaZnHCjmryS3ziVN9gZU
This commit is contained in:
Henrik RydgårdandClaude Sonnet 5 committed 2026-07-24 20:16:07 +02:00
1 parent e9c772cb7e
commit b2d375f2e5
2 files changed
+384 -382

No files matched your search

+1 -382
View File
@@ -561,389 +561,12 @@ endmacro()
add_subdirectory(ext)
if(WIN32)
set(CommonD3D
Common/GPU/D3D11/thin3d_d3d11.cpp
Common/GPU/D3D11/D3D11Loader.cpp
Common/GPU/D3D11/D3D11Loader.h
)
endif()
set(CommonVR
Common/VR/OpenXRLoader.cpp
Common/VR/OpenXRLoader.h
Common/VR/PPSSPPVR.cpp
Common/VR/PPSSPPVR.h
Common/VR/VRBase.cpp
Common/VR/VRBase.h
Common/VR/VRFramebuffer.cpp
Common/VR/VRFramebuffer.h
Common/VR/VRInput.cpp
Common/VR/VRInput.h
Common/VR/VRMath.cpp
Common/VR/VRMath.h
Common/VR/VRRenderer.cpp
Common/VR/VRRenderer.h
)
include_directories(ext/OpenXR-SDK/include)
# For ext/sol includes, that are usually included as sol/*.hpp
include_directories(ext)
add_library(Common STATIC
Common/ABI.cpp
Common/ABI.h
Common/CPUDetect.cpp
Common/CPUDetect.h
Common/Thunk.cpp
Common/Thunk.h
Common/x64Analyzer.cpp
Common/x64Analyzer.h
Common/x64Emitter.cpp
Common/x64Emitter.h
Common/ArmCPUDetect.cpp
Common/ArmEmitter.h
Common/ArmEmitter.cpp
Common/Arm64Emitter.h
Common/Arm64Emitter.cpp
Common/ArmEmitter.h
Common/ArmEmitter.cpp
Common/RiscVCPUDetect.cpp
Common/RiscVEmitter.cpp
Common/RiscVEmitter.h
Common/LoongArchCPUDetect.cpp
Common/LoongArch64Emitter.cpp
Common/LoongArch64Emitter.h
${CommonD3D}
${CommonVR}
Common/Serialize/Serializer.cpp
Common/Serialize/Serializer.h
Common/Serialize/SerializeDeque.h
Common/Serialize/SerializeFuncs.h
Common/Serialize/SerializeList.h
Common/Serialize/SerializeMap.h
Common/Serialize/SerializeSet.h
Common/Crypto/md5.cpp
Common/Crypto/md5.h
Common/Crypto/sha1.cpp
Common/Crypto/sha1.h
Common/Crypto/sha256.cpp
Common/Crypto/sha256.h
Common/Data/Collections/ConstMap.h
Common/Data/Collections/FixedSizeQueue.h
Common/Data/Collections/Hashmaps.h
Common/Data/Collections/TinySet.h
Common/Data/Collections/FastVec.h
Common/Data/Collections/CharQueue.h
Common/Data/Collections/CyclicBuffer.h
Common/Data/Collections/ThreadSafeList.h
Common/Data/Color/RGBAUtil.cpp
Common/Data/Color/RGBAUtil.h
Common/Data/Convert/ColorConv.cpp
Common/Data/Convert/ColorConv.h
Common/Data/Convert/SmallDataConvert.cpp
Common/Data/Convert/SmallDataConvert.h
Common/Data/Encoding/Base64.cpp
Common/Data/Encoding/Base64.h
Common/Data/Encoding/Compression.cpp
Common/Data/Encoding/Compression.h
Common/Data/Encoding/Shiftjis.h
Common/Data/Encoding/Utf8.cpp
Common/Data/Encoding/Utf8.h
Common/Data/Encoding/Utf16.h
Common/Data/Format/RIFF.cpp
Common/Data/Format/RIFF.h
Common/Data/Format/IniFile.cpp
Common/Data/Format/IniFile.h
Common/Data/Format/JSONReader.h
Common/Data/Format/JSONReader.cpp
Common/Data/Format/JSONWriter.h
Common/Data/Format/JSONWriter.cpp
Common/Data/Format/DDSLoad.cpp
Common/Data/Format/DDSLoad.h
Common/Data/Format/PNGLoad.cpp
Common/Data/Format/PNGLoad.h
Common/Data/Format/ZIMLoad.cpp
Common/Data/Format/ZIMLoad.h
Common/Data/Format/ZIMSave.cpp
Common/Data/Format/ZIMSave.h
Common/Data/Hash/Hash.cpp
Common/Data/Hash/Hash.h
Common/Data/Text/I18n.cpp
Common/Data/Text/I18n.h
Common/Data/Text/Parsers.cpp
Common/Data/Text/Parsers.h
Common/Data/Text/StringWriter.h
Common/Data/Text/WrapText.cpp
Common/Data/Text/WrapText.h
Common/Data/Random/Rng.h
Common/File/VFS/VFS.h
Common/File/VFS/VFS.cpp
Common/File/VFS/ZipFileReader.cpp
Common/File/VFS/ZipFileReader.h
Common/File/VFS/SevenZipFileReader.cpp
Common/File/VFS/SevenZipFileReader.h
Common/File/VFS/DirectoryReader.cpp
Common/File/VFS/DirectoryReader.h
Common/File/AndroidStorage.h
Common/File/AndroidStorage.cpp
Common/File/AndroidContentURI.h
Common/File/AndroidContentURI.cpp
Common/File/DiskFree.h
Common/File/DiskFree.cpp
Common/File/Path.h
Common/File/Path.cpp
Common/File/PathBrowser.h
Common/File/PathBrowser.cpp
Common/File/FileUtil.cpp
Common/File/FileUtil.h
Common/File/DirListing.cpp
Common/File/DirListing.h
Common/File/FileDescriptor.cpp
Common/File/FileDescriptor.h
Common/GPU/DataFormat.h
Common/GPU/MiscTypes.h
Common/GPU/GPUBackendCommon.cpp
Common/GPU/GPUBackendCommon.h
Common/GPU/thin3d.cpp
Common/GPU/thin3d.h
Common/GPU/thin3d_create.h
Common/GPU/Shader.cpp
Common/GPU/Shader.h
Common/GPU/ShaderWriter.cpp
Common/GPU/ShaderWriter.h
Common/GPU/ShaderTranslation.h
Common/GPU/ShaderTranslation.cpp
Common/GPU/OpenGL/GLCommon.h
Common/GPU/OpenGL/GLDebugLog.cpp
Common/GPU/OpenGL/GLDebugLog.h
Common/GPU/OpenGL/GLSLProgram.cpp
Common/GPU/OpenGL/GLSLProgram.h
Common/GPU/OpenGL/gl3stub.c
Common/GPU/OpenGL/gl3stub.h
Common/GPU/OpenGL/GLFeatures.cpp
Common/GPU/OpenGL/GLFeatures.h
Common/GPU/OpenGL/GLFrameData.cpp
Common/GPU/OpenGL/GLFrameData.h
Common/GPU/OpenGL/thin3d_gl.cpp
Common/GPU/OpenGL/GLMemory.cpp
Common/GPU/OpenGL/GLMemory.h
Common/GPU/OpenGL/GLRenderManager.cpp
Common/GPU/OpenGL/GLRenderManager.h
Common/GPU/OpenGL/GLQueueRunner.cpp
Common/GPU/OpenGL/GLQueueRunner.h
Common/GPU/OpenGL/GLProfiler.cpp
Common/GPU/OpenGL/GLProfiler.h
Common/GPU/OpenGL/DataFormatGL.cpp
Common/GPU/OpenGL/DataFormatGL.h
Common/GPU/Vulkan/VulkanBarrier.cpp
Common/GPU/Vulkan/VulkanBarrier.h
Common/GPU/Vulkan/VulkanDebug.cpp
Common/GPU/Vulkan/VulkanDebug.h
Common/GPU/Vulkan/VulkanContext.cpp
Common/GPU/Vulkan/VulkanContext.h
Common/GPU/Vulkan/VulkanDescSet.cpp
Common/GPU/Vulkan/VulkanDescSet.h
Common/GPU/Vulkan/VulkanFramebuffer.cpp
Common/GPU/Vulkan/VulkanFramebuffer.h
Common/GPU/Vulkan/VulkanImage.cpp
Common/GPU/Vulkan/VulkanImage.h
Common/GPU/Vulkan/VulkanLoader.cpp
Common/GPU/Vulkan/VulkanLoader.h
Common/GPU/Vulkan/VulkanMemory.cpp
Common/GPU/Vulkan/VulkanMemory.h
Common/GPU/Vulkan/VulkanProfiler.cpp
Common/GPU/Vulkan/VulkanProfiler.h
Common/GPU/Vulkan/thin3d_vulkan.cpp
Common/GPU/Vulkan/VulkanRenderManager.cpp
Common/GPU/Vulkan/VulkanRenderManager.h
Common/GPU/Vulkan/VulkanQueueRunner.cpp
Common/GPU/Vulkan/VulkanQueueRunner.h
Common/GPU/Vulkan/VulkanFrameData.cpp
Common/GPU/Vulkan/VulkanFrameData.h
Common/Input/GestureDetector.cpp
Common/Input/GestureDetector.h
Common/Input/KeyCodes.h
Common/Input/InputState.cpp
Common/Input/InputState.h
Common/Math/SIMDHeaders.h
Common/Math/SIMDHeaders.h
Common/Math/curves.cpp
Common/Math/curves.h
Common/Math/expression_parser.cpp
Common/Math/expression_parser.h
Common/Math/lin/matrix4x4.cpp
Common/Math/lin/matrix4x4.h
Common/Math/lin/vec3.cpp
Common/Math/lin/vec3.h
Common/Math/math_util.cpp
Common/Math/math_util.h
Common/Math/Statistics.h
Common/Math/Statistics.cpp
Common/Net/HTTPClient.cpp
Common/Net/HTTPClient.h
Common/Net/HTTPHeaders.cpp
Common/Net/HTTPHeaders.h
Common/Net/HTTPNaettRequest.cpp
Common/Net/HTTPNaettRequest.h
Common/Net/HTTPRequest.cpp
Common/Net/HTTPRequest.h
Common/Net/HTTPServer.cpp
Common/Net/HTTPServer.h
Common/Net/NetBuffer.cpp
Common/Net/NetBuffer.h
Common/Net/Resolve.cpp
Common/Net/Resolve.h
Common/Net/Sinks.cpp
Common/Net/Sinks.h
Common/Net/SocketCompat.h
Common/Net/URL.cpp
Common/Net/URL.h
Common/Net/WebsocketServer.cpp
Common/Net/WebsocketServer.h
Common/Profiler/Profiler.cpp
Common/Profiler/Profiler.h
Common/Render/AtlasGen.cpp
Common/Render/AtlasGen.h
Common/Render/TextureAtlas.cpp
Common/Render/TextureAtlas.h
Common/Render/DrawBuffer.cpp
Common/Render/DrawBuffer.h
Common/Render/ManagedTexture.cpp
Common/Render/ManagedTexture.h
Common/Render/Text/draw_text.cpp
Common/Render/Text/draw_text.h
Common/Render/Text/draw_text_android.cpp
Common/Render/Text/draw_text_android.h
Common/Render/Text/draw_text_win.cpp
Common/Render/Text/draw_text_win.h
Common/Render/Text/draw_text_uwp.cpp
Common/Render/Text/draw_text_uwp.h
Common/Audio/AudioBackend.h
Common/System/Display.cpp
Common/System/Display.h
Common/System/Application.h
Common/System/System.h
Common/System/NativeApp.h
Common/System/Request.cpp
Common/System/Request.h
Common/System/OSD.cpp
Common/System/OSD.h
Common/Thread/Channel.h
Common/Thread/ParallelLoop.cpp
Common/Thread/ParallelLoop.h
Common/Thread/Promise.h
Common/Thread/ThreadUtil.cpp
Common/Thread/ThreadUtil.h
Common/Thread/ThreadManager.cpp
Common/Thread/ThreadManager.h
Common/UI/AsyncImageFileView.cpp
Common/UI/AsyncImageFileView.h
Common/UI/Root.cpp
Common/UI/Root.h
Common/UI/Screen.cpp
Common/UI/Screen.h
Common/UI/UI.cpp
Common/UI/UI.h
Common/UI/Context.cpp
Common/UI/Context.h
Common/UI/IconCache.cpp
Common/UI/IconCache.h
Common/UI/UIScreen.cpp
Common/UI/UIScreen.h
Common/UI/Notice.cpp
Common/UI/Notice.h
Common/UI/Tween.cpp
Common/UI/Tween.h
Common/UI/View.cpp
Common/UI/View.h
Common/UI/ViewGroup.cpp
Common/UI/ViewGroup.h
Common/UI/ScrollView.cpp
Common/UI/ScrollView.h
Common/UI/TabHolder.cpp
Common/UI/TabHolder.h
Common/UI/PopupScreens.cpp
Common/UI/PopupScreens.h
Common/BitScan.h
Common/BitSet.h
Common/Buffer.h
Common/Buffer.cpp
Common/CodeBlock.h
Common/Common.h
Common/CommonFuncs.h
Common/CommonTypes.h
Common/DbgNew.h
Common/FakeEmitter.h
Common/FakeCPUDetect.cpp
Common/ExceptionHandlerSetup.cpp
Common/ExceptionHandlerSetup.h
Common/GhidraClient.h
Common/GhidraClient.cpp
Common/Log.h
Common/Log.cpp
Common/Log/ConsoleListener.cpp
Common/Log/ConsoleListener.h
Common/Log/LogManager.cpp
Common/Log/LogManager.h
Common/LogReporting.cpp
Common/LogReporting.h
Common/MemArenaAndroid.cpp
Common/MemArenaDarwin.cpp
Common/MemArenaPosix.cpp
Common/MemArenaWin32.cpp
Common/MemArenaHorizon.cpp
Common/MemArena.h
Common/MemoryUtil.cpp
Common/MemoryUtilHorizon.cpp
Common/MemoryUtil.h
Common/OSVersion.cpp
Common/OSVersion.h
Common/StringUtils.cpp
Common/StringUtils.h
Common/SysError.h
Common/SysError.cpp
Common/TimeUtil.cpp
Common/TimeUtil.h
ext/jpge/jpgd.cpp
ext/jpge/jpgd.h
ext/jpge/jpge.cpp
ext/jpge/jpge.h
)
if(LIBRETRO)
target_include_directories(Common PRIVATE libretro/libretro-common/include)
endif()
include_directories(Common)
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(USING_GLES2 OR (USING_EGL AND NOT USING_FBDEV))
find_package(X11)
endif()
@@ -1542,10 +1165,6 @@ else()
endif()
endif()
if(WIN32)
target_link_libraries(Common winmm dsound dxguid d2d1 dwrite d3d11 Version)
endif()
set(UISource)
if(NOT LIBRETRO)
list(APPEND UISource
@@ -1732,7 +1351,7 @@ add_library(xxhash STATIC
)
target_include_directories(xxhash PRIVATE ext/xxhash)
target_link_libraries(Common ${LIBZIP_LIBRARY} ${LIB7ZIP_LIBRARY} ${PNG_LIBRARIES} ${BASISU_LIBRARIES} ${ZLIB_LIBRARY} pugixml vma gason udis86 ${RT_LIB} ${ATOMIC_LIB})
add_subdirectory(Common)
set(CoreExtra)
set(CoreExtraLibs)
+383
View File
@@ -0,0 +1,383 @@
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} ${LIB7ZIP_LIBRARY} ${PNG_LIBRARIES} ${BASISU_LIBRARIES} ${ZLIB_LIBRARY} pugixml vma gason udis86 ${RT_LIB} ${ATOMIC_LIB})