问题描述
我正在使用CMake构建Qt项目,并且在命令行上必须提供 -DCMAKE_PREFIX_PATH =< path-to-qt>
才能使CMake能够
I'm building a Qt project with CMake and on the command line I have to give -DCMAKE_PREFIX_PATH=<path-to-qt>
for CMake to be able to find Qt.
现在,我在CLion中打开了该项目,但正如预期的那样,它没有找到Qt。命令行中 -DCMAKE_PREFIX_PATH = ...
的CLion等效项是什么?
Now I opened this project in CLion and as expected it didn't find Qt. What is the CLion equivalent of -DCMAKE_PREFIX_PATH=...
on the command line?
推荐答案
首先,打开CMake面板(按主窗口底部工具栏上的CMake按钮)。转到CMake的设置如下所示:
First, open the CMake panel (press the CMake button on the toolbar at the bottom of the main window). The goto CMake settings like shown below:
在设置对话框中,您现在可以根据需要配置CMake,还可以设置 CMAKE_PREFIX_PATH
选项:
In the settings dialog you can now configure CMake as required and also set the CMAKE_PREFIX_PATH
option:
这篇关于等同于CLion中的CMAKE_PREFIX_PATH的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!