[oe] [meta-qt4] Cmake Could NOT find Qt4, missing: QT_MOC_EXECUTABLE

Måns Zigher mans.zigher at gmail.com
Wed Feb 21 14:51:43 UTC 2018


After some more investigation I realized that qmake is actually detected
correctly the problem is that when running qmake2 -query I get the
following results

qmake2 -query

QT_INSTALL_PREFIX:/home/build/tmp/work/x86_64-linux/qt4-
native/4.8.7-r0/recipe-sysroot-native/usr


QT_INSTALL_DATA:/home/build/tmp/work/x86_64-linux/qt4-
native/4.8.7-r0/recipe-sysroot-native/usr/share/qt4


QT_INSTALL_DOCS:/home/build/tmp/work/x86_64-linux/qt4-
native/4.8.7-r0/recipe-sysroot-native/usr/share/doc/qt4


QT_INSTALL_HEADERS:/home/build/tmp/work/x86_64-linux/
qt4-native/4.8.7-r0/recipe-sysroot-native/usr/include/qt4


QT_INSTALL_LIBS:/home/build/tmp/work/x86_64-linux/qt4-
native/4.8.7-r0/recipe-sysroot-native/usr/lib


QT_INSTALL_BINS:/home/build/tmp/work/x86_64-linux/qt4-
native/4.8.7-r0/recipe-sysroot-native/usr/bin


QT_INSTALL_PLUGINS:/home/build/tmp/work/x86_64-linux/
qt4-native/4.8.7-r0/recipe-sysroot-native/usr/lib/qt4/plugins


QT_INSTALL_IMPORTS:/home/build/tmp/work/x86_64-linux/
qt4-native/4.8.7-r0/recipe-sysroot-native/usr/lib/qt4/imports


QT_INSTALL_TRANSLATIONS:/home/build/tmp/work/x86_64-linux/
qt4-native/4.8.7-r0/recipe-sysroot-native/usr/share/qt4/translations


QT_INSTALL_CONFIGURATION:/home/build/tmp/work/x86_64-
linux/qt4-native/4.8.7-r0/recipe-sysroot-native/etc/qt4


QT_INSTALL_EXAMPLES:/home/build/tmp/work/x86_64-linux/
qt4-native/4.8.7-r0/recipe-sysroot-native/usr/bin/qt4/examples


QT_INSTALL_DEMOS:/home/build/tmp/work/x86_64-linux/qt4-
native/4.8.7-r0/recipe-sysroot-native/usr/bin/qt4/demos


QMAKE_MKSPECS:/home/build/tmp/work/x86_64-linux/qt4-native/
4.8.7-r0/recipe-sysroot-native/usr/share/qt4/mkspecs


QMAKE_VERSION:2.01a
QT_VERSION:4.8.7

QT_INSTALL_BINS:/home/build/tmp/work/x86_64-linux/qt4-
native/4.8.7-r0/recipe-sysroot-native/usr/bin is a directory that is none
existing.

BR
Mans Zigher


2018-02-21 13:13 GMT+01:00 Måns Zigher <mans.zigher at gmail.com>:

> When running devshell I can verify that echo $PATH includes the
> recipe-sysroot-native dir and if I run "whereis qmake2" the
> recipe-sysroot-native dir appears. So the question remains why is CMake not
> detecting the binaries?
>
> BR
> Mans Zigher
>
> 2018-02-21 13:02 GMT+01:00 Måns Zigher <mans.zigher at gmail.com>:
>
>> Hi,
>>
>> I am trying to build a native QT application that is required when
>> generating the image. The recipe is depending on qt4-native and i am using
>> poky version rocko. The application is using CMake which is producing the
>> following error
>>
>> | -- Looking for Q_WS_MAC - not found
>> | CMake Error at recipe-sysroot-native/usr/shar
>> e/cmake-3.8/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
>>
>> |   Could NOT find Qt4 (missing: QT_MOC_EXECUTABLE QT_RCC_EXECUTABLE
>> |   QT_UIC_EXECUTABLE) (found version "4.8.7")
>> | Call Stack (most recent call first):
>> |   recipe-sysroot-native/usr/share/cmake-3.8/Modules/FindPackageHandleStandardArgs.cmake:377
>> (_FPHSA_FAILURE_MESSAGE)
>> |   recipe-sysroot-native/usr/share/cmake-3.8/Modules/FindQt4.cmake:1326
>> (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
>> |   CMakeLists.txt:5 (find_package)
>>
>> When using jethro the recipe works fine. If I search for qmake2 in the
>> build directory we get the following hits
>>
>> ./tmp/sysroots-components/x86_64/qt4-native/usr/bin/qmake2
>> ./tmp/work/x86_64-linux/my-qt-application/0.1-r0/recipe-sysr
>> oot-native/usr/bin/qmake2
>> ./tmp/work/x86_64-linux/qt4-native/4.8.7-r0/sysroot-destdir/
>> home/build/tmp/work/x86_64-linux/qt4-native/4.8.7-r0/recipe-
>> sysroot-native/usr/bin/qmake2
>>
>> I would think that CMake should find qmake2 in the recipe-sysroot-native
>> dir. Any help would be appreciated. How can I point CMake in the direction
>> so it finds the qt tools.
>>
>> BR
>> Måns Zigher
>>
>>
>



More information about the Openembedded-devel mailing list