Equivalent of CMAKE_PREFIX_PATH in CLion

2019-08-24 21:19发布

问题:

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.

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?

回答1:

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:

In the settings dialog you can now configure CMake as required and also set the CMAKE_PREFIX_PATH option:



标签: cmake clion