inherit qt6-paths SDK_POSTPROCESS_COMMAND:prepend = "create_qt6_sdk_files;" EXE_EXT = "" EXE_EXT:sdkmingw32 = ".exe" PATH_DELIM = ":" PATH_DELIM:sdkmingw32 = ";" QT6_INSTALL_HOST_LIBEXECDIR = "${QT6_INSTALL_LIBEXECDIR}" QT6_INSTALL_HOST_LIBEXECDIR:sdkmingw32 = "${QT6_INSTALL_LIBEXECDIR:mingw32}" TARGET_SYSROOT ?= "${SDKTARGETSYSROOT}" NATIVE_SYSROOT ?= "${SDKPATHNATIVE}" create_qt6_sdk_files () { # Generate a qt.conf file to be deployed with the SDK qtconf=${WORKDIR}/qt.conf echo '[Paths]' > $qtconf echo 'Prefix = ${prefix}' >> $qtconf echo 'Headers = ${QT6_INSTALL_INCLUDEDIR}' >> $qtconf echo 'Libraries = ${QT6_INSTALL_LIBDIR}' >> $qtconf echo 'ArchData = ${QT6_INSTALL_ARCHDATADIR}' >> $qtconf echo 'Data = ${QT6_INSTALL_DATADIR}' >> $qtconf echo 'Binaries = ${QT6_INSTALL_BINDIR}' >> $qtconf echo 'LibraryExecutables = ${QT6_INSTALL_LIBEXECDIR}' >> $qtconf echo 'Plugins = ${QT6_INSTALL_PLUGINSDIR}' >> $qtconf echo 'Qml2Imports = ${QT6_INSTALL_QMLDIR}' >> $qtconf echo 'Translations = ${QT6_INSTALL_TRANSLATIONSDIR}' >> $qtconf echo 'Documentation = ${QT6_INSTALL_DOCDIR}' >> $qtconf echo 'Settings = ${QT6_INSTALL_SYSCONFDIR}' >> $qtconf echo 'Examples = ${QT6_INSTALL_EXAMPLESDIR}' >> $qtconf echo 'Tests = ${QT6_INSTALL_TESTSDIR}' >> $qtconf echo 'HostPrefix = ${@os.path.relpath("${NATIVE_SYSROOT}", "${NATIVE_SYSROOT}${QT6_INSTALL_BINDIR}")}' >> $qtconf echo 'HostData = ${@os.path.relpath("${TARGET_SYSROOT}${QT6_INSTALL_ARCHDATADIR}", "${NATIVE_SYSROOT}")}' >> $qtconf echo 'HostBinaries = ${@os.path.relpath("${NATIVE_SYSROOT}${QT6_INSTALL_BINDIR}", "${NATIVE_SYSROOT}")}' >> $qtconf echo 'HostLibraries = ${@os.path.relpath("${NATIVE_SYSROOT}${QT6_INSTALL_LIBDIR}", "${NATIVE_SYSROOT}")}' >> $qtconf echo 'HostLibraryExecutables = ${@os.path.relpath("${NATIVE_SYSROOT}${QT6_INSTALL_HOST_LIBEXECDIR}", "${NATIVE_SYSROOT}")}' >> $qtconf echo 'Sysroot = ${@os.path.relpath("${TARGET_SYSROOT}", "${NATIVE_SYSROOT}${QT6_INSTALL_BINDIR}")}' >> $qtconf echo 'HostSpec = linux-oe-g++' >> $qtconf echo 'TargetSpec = linux-oe-g++' >> $qtconf echo 'SysrootifyPrefix = true' >> $qtconf # add qt.conf to both bin and libexec dirs cp ${WORKDIR}/qt.conf ${SDK_OUTPUT}${NATIVE_SYSROOT}${QT6_INSTALL_BINDIR}/ cp ${WORKDIR}/qt.conf ${SDK_OUTPUT}${NATIVE_SYSROOT}${QT6_INSTALL_HOST_LIBEXECDIR}/ cp ${WORKDIR}/qt.conf ${SDK_OUTPUT}${NATIVE_SYSROOT}${QT6_INSTALL_BINDIR}/target_qt.conf install -d ${SDK_OUTPUT}${NATIVE_SYSROOT}/environment-setup.d script=${SDK_OUTPUT}${NATIVE_SYSROOT}/environment-setup.d/qt6.sh touch $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_STRIP="$STRIP"' >> $script echo 'export OE_QMAKE_OBJCOPY="$OBJCOPY"' >> $script echo 'export OE_QMAKE_AR_LTCG="${HOST_PREFIX}gcc-ar"' >> $script # Generate a toolchain file for using Qt without running setup-environment script cat > ${SDK_OUTPUT}${NATIVE_SYSROOT}/usr/share/cmake/Qt6Toolchain.cmake < ${SDK_OUTPUT}${NATIVE_SYSROOT}/usr/share/conan/profile <