From c5e8f34f7543618464e86205799dc78dc828502e Mon Sep 17 00:00:00 2001 From: Comely Date: Sun, 12 Jul 2026 07:15:39 -0700 Subject: [PATCH] fix(cmake): exclude demo app from product integration --- CMakeLists.txt | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fae6aec..2055170 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -78,6 +78,11 @@ option( "Install update-client runtime assets from this project" ${UPDATE_CLIENT_IS_STANDALONE} ) +option( + UPDATE_CLIENT_BUILD_DEMO_APP + "Build the standalone MainApp integration demo" + ${UPDATE_CLIENT_IS_STANDALONE} +) list(PREPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") include(UpdateClientDependencies) @@ -137,10 +142,20 @@ target_link_libraries(UpdateClientUpdaterLogic add_subdirectory(Launcher) add_subdirectory(Updater) -add_subdirectory(MainApp) -foreach(_update_client_primary_target IN ITEMS - Bootstrap Common UpdateClientUpdaterLogic Launcher Updater MainApp) +set(_update_client_primary_targets + Bootstrap + Common + UpdateClientUpdaterLogic + Launcher + Updater +) +if(UPDATE_CLIENT_BUILD_DEMO_APP) + add_subdirectory(MainApp) + list(APPEND _update_client_primary_targets MainApp) +endif() + +foreach(_update_client_primary_target IN LISTS _update_client_primary_targets) add_dependencies("${_update_client_primary_target}" UpdateClientNoHanCheck) endforeach()