CLionAndQt - ProjectStow/ClassExamples GitHub Wiki
General advice on projects that need to run in Qt Creator and CLoin:
The Variable CMAKE_PREFIX_PATH should either be set externally or in the CMakeLists.txt file.
The value should be the path to the Qt Version you want to use and your platform
For example on my system Qt 6.5.2 is location at "/Users/jerrygoodnough/Qt/6.5.2/macos"
So in my CMakeLists.txt file I could add the third set command below, the other lines are included for context. ... set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_PREFIX_PATH "/Users/jerrygoodnough/Qt/6.5.2/macos") ...
If maybe be cleaner to use the following syntax .... if (NOT DEFINED CMAKE_PREFIX_PATH) set(CMAKE_PREFIX_PATH "/Users/jerrygoodnough/Qt/6.5.2/macos") endif()
The default CMAKE _PREFIX_PATH may also be defined in the CLion Settings | Build, Execution, Deployment | CMake as follows