Split Windows app shell target

This commit is contained in:
2026-06-02 21:27:46 +02:00
parent 6a3cd867f0
commit def1a170dc
4 changed files with 31 additions and 9 deletions

View File

@@ -258,14 +258,32 @@ if(PP_BUILD_APP)
set_source_files_properties(src/version.cpp
PROPERTIES SKIP_PRECOMPILE_HEADERS ON)
add_library(panopainter_app INTERFACE)
target_link_libraries(panopainter_app
INTERFACE
pp_legacy_app)
add_library(pp_platform_windows OBJECT
${PP_WINDOWS_PLATFORM_SOURCES})
target_link_libraries(pp_platform_windows
PUBLIC
panopainter_app
PRIVATE
pp_project_options
pp_project_warnings)
target_precompile_headers(pp_platform_windows REUSE_FROM pp_legacy_app)
set_target_properties(pp_platform_windows PROPERTIES
VS_GLOBAL_CharacterSet "Unicode")
add_executable(PanoPainter WIN32
${PP_WINDOWS_APP_SOURCES})
${PP_WINDOWS_APP_SOURCES}
$<TARGET_OBJECTS:pp_platform_windows>)
target_link_libraries(PanoPainter
PRIVATE
pp_project_options
pp_project_warnings
pp_legacy_app
pp_platform_windows
"${CMAKE_CURRENT_SOURCE_DIR}/libs/bugtrap-client/lib/BugTrapU-x64.lib"
"$<$<CONFIG:Debug>:${CMAKE_CURRENT_SOURCE_DIR}/libs/curl-win/lib/dll-debug-x64/libcurl_debug.lib>"
"$<$<NOT:$<CONFIG:Debug>>:${CMAKE_CURRENT_SOURCE_DIR}/libs/curl-win/lib/dll-release-x64/libcurl.lib>"
@@ -282,7 +300,6 @@ if(PP_BUILD_APP)
user32
wbemuuid)
target_precompile_headers(PanoPainter REUSE_FROM pp_legacy_app)
set_target_properties(PanoPainter PROPERTIES
VS_GLOBAL_CharacterSet "Unicode")

View File

@@ -81,8 +81,11 @@ set(PP_LEGACY_APP_SOURCES
src/wacom.cpp
)
set(PP_WINDOWS_APP_SOURCES
set(PP_WINDOWS_PLATFORM_SOURCES
src/main.cpp
)
set(PP_WINDOWS_APP_SOURCES
PanoPainter.rc
)
@@ -140,4 +143,3 @@ set(PP_LEGACY_INCLUDE_DIRS
"${CMAKE_CURRENT_SOURCE_DIR}/libs/wacom"
"${CMAKE_CURRENT_SOURCE_DIR}/libs/yoga"
)

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 |
| 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` |
| 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

@@ -142,9 +142,12 @@ Goal: make CMake the canonical source list without breaking existing projects.
Status: in progress. Root `CMakeLists.txt`, `CMakePresets.json`, and project
option targets exist. The Windows desktop app builds through CMake as
`PanoPainter`; the raw Visual Studio solution/project files were removed on
2026-05-31 by user decision. 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.
2026-05-31 by user decision. The root CMake Windows app graph now includes a
`panopainter_app` composition target and `pp_platform_windows` shell target so
`PanoPainter` is only the executable/resource wrapper. 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: