[Interest] QtCreator - CMAKE_PREFIX_PATH with multiple paths

Nuno Santos nuno.santos at imaginando.pt
Thu Feb 9 16:58:19 CET 2023


Cristian,

Are you able to do this in the QtCreator build settings?

Because for me it gets red and it 



And then it does not work at all:

CMake Error at CMakeLists.txt:16 (find_package):
  By not providing "FindQt6.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "Qt6", but
  CMake did not find one.

Thank you!

Nuno

> On 9 Feb 2023, at 15:35, Cristian Adam <cristian.adam at qt.io> wrote:
> 
> 
> 
> On 02/09/2023 16:29, Nuno Santos wrote:
>> Hi,
>> 
>> Is anyone able to tell me if QtCreator is able to have a CMAKE var defined with multiple values?
>> 
>> The default value for a project is %{Qt:QT_INSTALL_PREFIX}, is it possible to append more paths?
>> 
>> How?
>> 
>> Thanks!
>> 
>> Nuno
> I have for Qt Creator itself the following:
> 
> -DCMAKE_PREFIX_PATH:PATH=%{Qt:QT_INSTALL_PREFIX};c:/llvm/msvc
> 
> The CMake documentation <https://cmake.org/cmake/help/latest/variable/CMAKE_PREFIX_PATH.html> states:
> 
> Semicolon-separated list <https://cmake.org/cmake/help/latest/manual/cmake-language.7.html#cmake-language-lists> of directories specifying installation prefixes to be searched by the find_package() <https://cmake.org/cmake/help/latest/command/find_package.html#command:find_package>,find_program() <https://cmake.org/cmake/help/latest/command/find_program.html#command:find_program>, find_library() <https://cmake.org/cmake/help/latest/command/find_library.html#command:find_library>, find_file() <https://cmake.org/cmake/help/latest/command/find_file.html#command:find_file>, and find_path() <https://cmake.org/cmake/help/latest/command/find_path.html#command:find_path> commands. Each command will add appropriate subdirectories (like bin, lib, or include) as specified in its own documentation.
> 
> By default this is empty. It is intended to be set by the project.
> 
> 
> Cheers,
> Cristian.
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20230209/004e5be7/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screenshot 2023-02-09 at 15.57.18.png
Type: image/png
Size: 27691 bytes
Desc: not available
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20230209/004e5be7/attachment-0001.png>


More information about the Interest mailing list