Qt Include paths when using conan
-
We build Qt as a
conan-package
. During the build we redefineMODULE_VERSION
=major.minor.patch.build_number
inside.qmake.conf
in everyQT_MODULE
load(qt_build_config) CONFIG += warning_clean QT_SOURCE_TREE = $$PWD QT_BUILD_TREE = $$shadowed($$PWD) MODULE_VERSION = 5.12.5.234 # major.minor.patch.build_number
Because of that we end up with unnecessary
build_version
number in the include paths.include\QtCore\5.12.5.234 // .234 is unnecessary
We use such approach to version binaries:
The question is how to keep binaries versioning AND get rid of
build_number
from include paths:include\QtCore\5.12.5`.234` //wrong include\QtCore\5.12.5 //OK
-
You build Qt only once as third party lib, right? If yes, why is the build number added in the first place?
-
@JoeCFD no not once. we are building it with custom patches. so we have to increment the build number
-
Are you using cmake or qmake, or both?
I think you can get env QTDIR on windows.
Include path of Qt is set automatically. If your path with build_number is used, simply use QTDIR + build_number to add include path in the pro file explicitly. As long as the include path is set properly, it should not matter where it is located.