diff options
-rw-r--r-- | meta-qt5/classes/populate_sdk_qt5.bbclass | 21 | ||||
-rw-r--r-- | meta-qt5/recipes-qt/qt5/nativesdk-qtbase.inc | 30 |
2 files changed, 31 insertions, 20 deletions
diff --git a/meta-qt5/classes/populate_sdk_qt5.bbclass b/meta-qt5/classes/populate_sdk_qt5.bbclass index 7b31bbb070..79df489013 100644 --- a/meta-qt5/classes/populate_sdk_qt5.bbclass +++ b/meta-qt5/classes/populate_sdk_qt5.bbclass @@ -6,26 +6,7 @@ TOOLCHAIN_TARGET_TASK += "packagegroup-qt5-toolchain-target" # This allow reuse of Qt paths inherit qmake5_paths -toolchain_create_sdk_env_script_append () { - echo 'export PATH=${SDKPATHNATIVE}${OE_QMAKE_PATH_HOST_BINS}:$PATH' >> $script - echo 'export OE_QMAKE_CFLAGS="$CFLAGS"' >> $script - echo 'export OE_QMAKE_CXXFLAGS="$CXXFLAGS"' >> $script - echo 'export OE_QMAKE_LDFLAGS="$LDFLAGS"' >> $script - echo 'export OE_QMAKE_CC=$CC' >> $script - echo 'export OE_QMAKE_CXX=$CXX' >> $script - echo 'export OE_QMAKE_LINK=$CXX' >> $script - echo 'export OE_QMAKE_AR=$AR' >> $script - echo 'export OE_QMAKE_LIBDIR_QT=${SDKTARGETSYSROOT}${OE_QMAKE_PATH_LIBS}' >> $script - echo 'export OE_QMAKE_INCDIR_QT=${SDKTARGETSYSROOT}${OE_QMAKE_PATH_QT_HEADERS}' >> $script - echo 'export OE_QMAKE_MOC=${SDKPATHNATIVE}${OE_QMAKE_PATH_HOST_BINS}/moc' >> $script - echo 'export OE_QMAKE_UIC=${SDKPATHNATIVE}${OE_QMAKE_PATH_HOST_BINS}/uic' >> $script - echo 'export OE_QMAKE_RCC=${SDKPATHNATIVE}${OE_QMAKE_PATH_HOST_BINS}/rcc' >> $script - echo 'export OE_QMAKE_QDBUSCPP2XML=${SDKPATHNATIVE}${OE_QMAKE_PATH_HOST_BINS}/qdbuscpp2xml' >> $script - echo 'export OE_QMAKE_QDBUSXML2CPP=${SDKPATHNATIVE}${OE_QMAKE_PATH_HOST_BINS}/qdbusxml2cpp' >> $script - echo 'export OE_QMAKE_QT_CONFIG=${SDKTARGETSYSROOT}${OE_QMAKE_PATH_LIBS}/${QT_DIR_NAME}/mkspecs/qconfig.pri' >> $script - echo 'export QMAKESPEC=${SDKTARGETSYSROOT}${OE_QMAKE_PATH_LIBS}/${QT_DIR_NAME}/mkspecs/linux-oe-g++' >> $script - echo 'export QT_CONF_PATH=${SDKPATHNATIVE}${OE_QMAKE_PATH_HOST_BINS}/qt.conf' >> $script - +create_sdk_files_prepend () { # make a symbolic link to mkspecs for compatibility with QTCreator (cd ${SDK_OUTPUT}/${SDKPATHNATIVE}; \ ln -sf ${SDKTARGETSYSROOT}${libdir}/${QT_DIR_NAME}/mkspecs mkspecs;) diff --git a/meta-qt5/recipes-qt/qt5/nativesdk-qtbase.inc b/meta-qt5/recipes-qt/qt5/nativesdk-qtbase.inc index faecc64369..12f5a543bb 100644 --- a/meta-qt5/recipes-qt/qt5/nativesdk-qtbase.inc +++ b/meta-qt5/recipes-qt/qt5/nativesdk-qtbase.inc @@ -57,6 +57,7 @@ FILES_${PN}-tools-dbg = " \ FILES_${PN}-tools = " \ ${libdir}/lib*${SOLIBS} \ ${OE_QMAKE_PATH_BINS}/* \ + ${SDKPATHNATIVE}/environment-setup.d \ " # qttools binaries are placed in a subdir of bin in order to avoid @@ -218,3 +219,32 @@ do_install() { -not -name 'libQt5Bootstrap.a' \ -exec rm '{}' ';' } + +do_generate_qt_environment_file() { + mkdir -p ${D}${SDKPATHNATIVE}/environment-setup.d/ + script=${D}${SDKPATHNATIVE}/environment-setup.d/qt5.sh + + echo 'export PATH=${OE_QMAKE_PATH_HOST_BINS}:$PATH' > $script + echo 'export OE_QMAKE_CFLAGS="$CFLAGS"' >> $script + echo 'export OE_QMAKE_CXXFLAGS="$CXXFLAGS"' >> $script + echo 'export OE_QMAKE_LDFLAGS="$LDFLAGS"' >> $script + echo 'export OE_QMAKE_CC=$CC' >> $script + echo 'export OE_QMAKE_CXX=$CXX' >> $script + echo 'export OE_QMAKE_LINK=$CXX' >> $script + echo 'export OE_QMAKE_AR=$AR' >> $script + echo 'export QT_CONF_PATH=${OE_QMAKE_PATH_HOST_BINS}/qt.conf' >> $script + echo 'export OE_QMAKE_LIBDIR_QT=`qmake -query QT_INSTALL_LIBS`' >> $script + echo 'export OE_QMAKE_INCDIR_QT=`qmake -query QT_INSTALL_HEADERS`' >> $script + echo 'export OE_QMAKE_MOC=${OE_QMAKE_PATH_HOST_BINS}/moc' >> $script + echo 'export OE_QMAKE_UIC=${OE_QMAKE_PATH_HOST_BINS}/uic' >> $script + echo 'export OE_QMAKE_RCC=${OE_QMAKE_PATH_HOST_BINS}/rcc' >> $script + echo 'export OE_QMAKE_QDBUSCPP2XML=${OE_QMAKE_PATH_HOST_BINS}/qdbuscpp2xml' >> $script + echo 'export OE_QMAKE_QDBUSXML2CPP=${OE_QMAKE_PATH_HOST_BINS}/qdbusxml2cpp' >> $script + echo 'export OE_QMAKE_QT_CONFIG=${OE_QMAKE_PATH_TARGET_LIBS}/${QT_DIR_NAME}/mkspecs/qconfig.pri' >> $script + echo 'export QMAKESPEC=`qmake -query QT_INSTALL_LIBS`/mkspecs/linux-oe-g++' >> $script + + # Use relocable sysroot + sed -i -e 's:${SDKPATHNATIVE}:$OECORE_NATIVE_SYSROOT:g' $script +} + +addtask generate_qt_environment_file after do_install before do_package |