Move version metadata into app target

This commit is contained in:
2026-06-02 21:40:30 +02:00
parent a2e47c862e
commit b80bd759aa
4 changed files with 21 additions and 13 deletions

View File

@@ -256,13 +256,19 @@ if(PP_BUILD_APP)
target_precompile_headers(pp_legacy_app PRIVATE src/pch.h)
set_source_files_properties(${PP_VENDOR_SOURCES}
PROPERTIES SKIP_PRECOMPILE_HEADERS ON)
set_source_files_properties(src/version.cpp
PROPERTIES SKIP_PRECOMPILE_HEADERS ON)
add_library(panopainter_app INTERFACE)
add_library(panopainter_app STATIC
${PP_PANOPAINTER_APP_SOURCES})
target_include_directories(panopainter_app
PUBLIC
"${CMAKE_CURRENT_SOURCE_DIR}/src")
target_link_libraries(panopainter_app
INTERFACE
pp_legacy_app)
PUBLIC
pp_legacy_app
pp_project_options
PRIVATE
pp_project_warnings)
pp_add_version_generation(panopainter_app "$<IF:$<CONFIG:Debug>,debug,release>")
add_library(pp_platform_windows OBJECT
${PP_WINDOWS_PLATFORM_SOURCES})
@@ -304,8 +310,6 @@ if(PP_BUILD_APP)
set_target_properties(PanoPainter PROPERTIES
VS_GLOBAL_CharacterSet "Unicode")
pp_add_version_generation(PanoPainter "$<IF:$<CONFIG:Debug>,debug,release>")
pp_configure_windows_runtime_payloads(PanoPainter)
else()
message(WARNING "PP_BUILD_APP is enabled, but the root CMake app target is currently Windows-only. Platform alignment is tracked in Phase 6.")

View File

@@ -77,10 +77,13 @@ set(PP_LEGACY_APP_SOURCES
src/shape.cpp
src/texture.cpp
src/util.cpp
src/version.cpp
src/wacom.cpp
)
set(PP_PANOPAINTER_APP_SOURCES
src/version.cpp
)
set(PP_WINDOWS_PLATFORM_SOURCES
src/main.cpp
)

View File

@@ -10,7 +10,7 @@ Keep it updated as platform paths move to shared CMake targets.
| Platform/Target | Current Entrypoint | Notes |
| --- | --- | --- |
| Windows desktop | Root `CMakeLists.txt`, preset `windows-msvc-default`; target preset `windows-vs2026-x64` retained for VS 2026 | Raw `.sln/.vcxproj` files removed on 2026-05-31; local machine currently uses Visual Studio 17 2022; `PanoPainter` now links through `pp_platform_windows` and `panopainter_app`, with Windows/vendor link dependencies owned by the platform shell and runtime payload deployment in `cmake/PanoPainterRuntime.cmake` |
| Windows desktop | Root `CMakeLists.txt`, preset `windows-msvc-default`; target preset `windows-vs2026-x64` retained for VS 2026 | Raw `.sln/.vcxproj` files removed on 2026-05-31; local machine currently uses Visual Studio 17 2022; `PanoPainter` now links through `pp_platform_windows` and `panopainter_app`, with Windows/vendor link dependencies owned by the platform shell, runtime payload deployment in `cmake/PanoPainterRuntime.cmake`, and version metadata owned by `panopainter_app` |
| Windows AppX | `PanoPainterPackage/Package.appxmanifest`, `.wapproj` referenced by solution | Distribution packaging |
| macOS | `PanoPainter-OSX/` project files and `Info.plist` | Uses `NSOpenGLView` today |
| iOS | `PanoPainter/Info.plist`, related Apple sources | Uses OpenGL ES today |

View File

@@ -146,10 +146,11 @@ option targets exist. The Windows desktop app builds through CMake as
`panopainter_app` composition target and `pp_platform_windows` shell target so
`PanoPainter` is only the executable/resource wrapper; Windows and vendor link
dependencies now belong to the platform shell target, and Windows runtime
payload deployment lives behind `cmake/PanoPainterRuntime.cmake`. Android arm64
now configures and builds headless foundation/tool targets through the root
CMake/NDK path. Non-Windows platform app/package files remain during Phase 6
alignment.
payload deployment lives behind `cmake/PanoPainterRuntime.cmake`.
`panopainter_app` is now a real static target that owns app version metadata
and version-header generation. Android arm64 now configures and builds headless
foundation/tool targets through the root CMake/NDK path. Non-Windows platform
app/package files remain during Phase 6 alignment.
Implementation tasks: