-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
90 lines (72 loc) · 2.7 KB
/
CMakeLists.txt
File metadata and controls
90 lines (72 loc) · 2.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
cmake_minimum_required(VERSION 3.16)
# Include build log helper
message("Including Requested CMake Dependencies...")
include(cmake/build_log_helper.cmake)
message("Logger OK")
message("Including Requested CMake Dependencies OK")
# Toolchain configuration (must be before project() call)
# Supports both:
# cmake -DCMAKE_TOOLCHAIN_FILE=/path/to/toolchain.cmake -S . -B out/build
# cmake -DUSE_TOOLCHAIN=windows/llvm -S . -B out/build
include(cmake/check_toolchain.cmake)
project(CFDesktop
VERSION 0.19.0
DESCRIPTION "CFDesktop: Given Your Device Portable Desktop Anywhere"
HOMEPAGE_URL "https://github.com/Awesome-Embedded-Learning-Studio/CFDesktop"
LANGUAGES CXX C
)
# ============================================================
# Pre-configure Checks and Setup
# ============================================================
include(cmake/check_pre_configure.cmake)
# ============================================================
# Generate Meta Information Headers
# ============================================================
include(cmake/generate_meta_info.cmake)
# Generate meta info headers after Qt6 is found
cf_generate_meta_info()
# Generate desktop_settings.h
include(cmake/generate_desktop_settings.cmake)
cf_generate_desktop_settings()
# Apply desktop root overlay (needs CFDESKTOP_DEFAULT_ROOT from above)
cf_apply_desktop_root_overlay()
# Log base module start
log_module_start("base")
add_subdirectory(base)
# Log base module end
log_module_end("base")
# Log base module start
log_module_start("ui")
add_subdirectory(ui)
# Log base module end
log_module_end("ui")
log_module_start("desktop")
add_subdirectory(desktop)
# Log base module end
log_module_end("desktop")
log_module_start("example")
add_subdirectory("example")
log_module_end("example")
# Log test module start
log_module_start("test")
add_subdirectory(test)
# Log test module end
log_module_end("test")
# ============================================================
# Post-Build Setup (必须在所有 add_subdirectory 之后)
# ============================================================
# 生成 Windows 启动脚本 (如果使用 ExampleLauncher)
if(WIN32)
log_info("Launcher" "Generating Windows launcher scripts")
cf_generate_all_launchers()
endif()
# 设置共享 Qt 部署 (Windows)
if(WIN32)
log_info("QtDeploy" "Setting up shared Qt deployment")
cf_setup_shared_qt_deployment()
endif()
# ============================================================
# Final Configuration Summary
# ============================================================
log_build_summary_table()
log_info("Final" "Configuration Ends! You can try to build now!")