I'm trying to figure out how to use Qt Creator's settings and pass some CMake arguments. Let's say I have an app which I can build using the terminal like so:
cmake .. -DQTDIR=/home/myCustomBuildStuff
-DLD_LIBRARY_PATH=/home/myCustomBuildStuff
-DCMAKE_INCLUDE_PATH=/home/myCustomBuildStuff/include
# etc.
As you can see, I'm using my custom built Qt (plus some other libs). When I build using the terminal, everything works.
But now I want to try to use the Qt Creator and pass all the CMake arguments by using the Qt Creator settings.
I tried to use the CMake Configuration settings that can be found in the Kits. I tried to modify the Build Settings, and add my arguments directly to the Build Steps and/or CMake table above. None of that helps and my app fails to include my custom built QtWidgets
from main.cpp
:
/usr/lib/x86_64-linux-gnu/libQt5Core.so.5:-1: error:
version 'Qt_5.9' not found (required by home/myCustomBuiltStaff/bin/uic)
In the error above the path is obviously wrong (it needs to search in /home/myCustomBuiltStuff/
folder). But how do I pass that path by using the Qt Creator settings?
Note, I cannot touch the content of the CMake file and only want to make it to build as it builds in my terminal when I pass all the paths as arguments to CMake.
Custom Process Step
. This should give you the exact same result as running it in a terminal. – m7913d