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()

© 2025 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.