Building QT6 from sources (CorePrivate)
-
@driver my goodness, why didn't you say so right at the beginning? That threw me completely off-course :D
I've checked now, and it also does not work for me. I have checked on custom-built Qt and also on official release (Qt 6.4.3 in both cases).
So, the documentation here is wrong. Apparently, the solution is not to add private stuff to
find_package
but instead only link to core library, like so:target_link_libraries(${PROJECT_LIB} PUBLIC Qt${QT_VERSION_MAJOR}::Core PUBLIC Qt${QT_VERSION_MAJOR}::CorePrivate )
-
@driver said in Building QT6 from sources (CorePrivate):
Private QT API CorePrivate seems not to be found when building QT 6.6.2 from sources.
Private class headers e.g. private/qobject_p.h not found with cmake and QtCreator.Qt is not intended to be built by Qt Creator, but from command line.
You should run
configure
first, beforecmake
, to make sure all generated files are properly set up. -
@sierdzio
QT 6.6.2 build on Debian 6 with gcc 12.2.0./configure -platform linux-g++-64 -developer-build -debug -no-warrnings-are-errors
cmake --build . -parallel
What I mean is:
CMakeLists.txt
find_package(Qt6 REQUIRED COMPONENTS Core CorePrivate)error:
Qt-src/qtbase/lib/cmake/Qt6CorePrivate/Qt6CorePrivateConfig.cmake does NOT exist -
@driver I'm not sure if in-source builds are still supported. Also, if you don't intend to contribute to Qt itself, there is no need for a
-developer-build
.But all of this is just me guessing. If this error comes up while building Qt itself, I don't know how to solve it. Your configure and build steps look roughly OK.
-
@driver my goodness, why didn't you say so right at the beginning? That threw me completely off-course :D
I've checked now, and it also does not work for me. I have checked on custom-built Qt and also on official release (Qt 6.4.3 in both cases).
So, the documentation here is wrong. Apparently, the solution is not to add private stuff to
find_package
but instead only link to core library, like so:target_link_libraries(${PROJECT_LIB} PUBLIC Qt${QT_VERSION_MAJOR}::Core PUBLIC Qt${QT_VERSION_MAJOR}::CorePrivate )
-