QT_NO_STANDARD_PROJECT_SETUP

防止后续对 qt_standard_project_setup() 的调用进行任何更改。

该变量自 Qt 6.3 起引入。

qt_standard_project_setup()命令通常在项目的顶级CMakeLists.txt 文件中调用。在某些情况下,此类项目可能会被纳入更大的项目层次结构中,作为子项目。 父项目可能希望阻止任何子项目对设置进行修改。父项目可以通过在通过add_subdirectory()、FetchContent_MakeAvailable() 或 CMake 提供的其他类似方法引入子项目之前,将QT_NO_STANDARD_PROJECT_SETUP 设置为TRUE 来实现这一点。

另请参阅 qt_standard_project_setup()。

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.