fix(build): 修正 cmake SOURCES 的文件名大小写,使 Linux/macOS 可构建
cmake 的 SOURCES 列表引用的文件名与 git 跟踪名仅大小写不同。Windows 大小写不 敏感故能编译,但在 Linux/macOS 上 git checkout 会按跟踪名落盘,CMake 精确匹配 不到便报 "Cannot find source file"。 - src/cad_mcp_frame/cmakelists.txt: stdafx.cpp → StdAfx.cpp, mcp_configParser.cpp → mcp_ConfigParser.cpp - src/cad_mcp_plugins/cmakelists.txt: stdafx.cpp → StdAfx.cpp 统一方向取「大写」,与既有引用保持一致: - 所有 #include "StdAfx.h"、target_precompile_headers(... PRIVATE StdAfx.h) - #include "mcp_ConfigParser.h"、class mcp_ConfigParser 仅上述两处 SOURCES 列表写成了小写,是唯一的例外,故改 cmake 而非重命名文件。 同时把本机磁盘上的 mcp_configParser.cpp 规范化为 mcp_ConfigParser.cpp,使工作 副本与仓库一致(Windows 大小写不敏感,不影响构建)。 验证: - 全项目扫描 cmake/include 引用与 git ls-files 的精确大小写匹配 → 无不一致 - cmake --build --preset R230 --config Debug 成功(CMake 重新配置正常, 源码未变故未重链接,无需关闭 CAD)
This commit is contained in:
1 parent
3bd77d950e
commit
526d5f8911
2 files changed
+3
-3
No files matched your search
@@ -8,11 +8,11 @@ find_package(ghc_filesystem CONFIG REQUIRED)
|
||||
set(SOURCES
|
||||
"cad_mcp_frame.cpp"
|
||||
"command.cpp"
|
||||
"stdafx.cpp"
|
||||
"StdAfx.cpp"
|
||||
"cad_mcp_frame.rc"
|
||||
"mcp_server.cpp"
|
||||
"mcp_tool.cpp"
|
||||
"mcp_configParser.cpp"
|
||||
"mcp_ConfigParser.cpp"
|
||||
"mcp_utils.cpp"
|
||||
)
|
||||
add_def_file_name(SOURCES "${PROJECT_NAME}")
|
||||
|
||||
@@ -7,7 +7,7 @@ find_package(ghc_filesystem CONFIG REQUIRED)
|
||||
|
||||
set(SOURCES
|
||||
"mcp_plugins.cpp"
|
||||
"stdafx.cpp"
|
||||
"StdAfx.cpp"
|
||||
"dwg_review_common.cpp"
|
||||
"dwg_review_overview.cpp"
|
||||
"dwg_review_query.cpp"
|
||||
|
||||
Reference in new issue
Block a user