From 8d71e749fc634b6d71ee019b45991cef48d12fc7 Mon Sep 17 00:00:00 2001 From: Otavio Salvador Date: Mon, 20 Oct 2014 23:54:05 -0200 Subject: [PATCH] nativesdk-qtbase: Add CMake toolchain configuration This allow out of box use of CMake in a SDK; this includes the subscript to properly set the host binaries path. (From meta-qt5 rev: 05213cd7ba5d1347ae2c73d51fc52d7af1fb6938) Signed-off-by: Otavio Salvador Signed-off-by: Patrick Ohly --- meta-qt5/recipes-qt/qt5/nativesdk-qtbase.inc | 11 +++++++++++ meta-qt5/recipes-qt/qt5/qtbase-git/OEQt5Toolchain.cmake | 1 + meta-qt5/recipes-qt/qt5/qtbase/OEQt5Toolchain.cmake | 1 + 3 files changed, 13 insertions(+) create mode 100644 meta-qt5/recipes-qt/qt5/qtbase-git/OEQt5Toolchain.cmake create mode 100644 meta-qt5/recipes-qt/qt5/qtbase/OEQt5Toolchain.cmake diff --git a/meta-qt5/recipes-qt/qt5/nativesdk-qtbase.inc b/meta-qt5/recipes-qt/qt5/nativesdk-qtbase.inc index 832fda9..cf6b27b 100644 --- a/meta-qt5/recipes-qt/qt5/nativesdk-qtbase.inc +++ b/meta-qt5/recipes-qt/qt5/nativesdk-qtbase.inc @@ -35,6 +35,11 @@ SRC_URI += " \ file://0013-configure-preserve-built-qmake-and-swap-with-native-.patch \ " +# CMake's toolchain configuration of nativesdk-qtbase +SRC_URI += " \ + file://OEQt5Toolchain.cmake \ +" + PACKAGES = "${PN}-tools-dbg ${PN}-tools-dev ${PN}-tools-staticdev ${PN}-tools" PACKAGE_DEBUG_SPLIT_STYLE = "debug-without-src" @@ -58,6 +63,7 @@ FILES_${PN}-tools = " \ ${libdir}/lib*${SOLIBS} \ ${OE_QMAKE_PATH_BINS}/* \ ${SDKPATHNATIVE}/environment-setup.d \ + ${datadir}/cmake \ " # qttools binaries are placed in a subdir of bin in order to avoid @@ -229,6 +235,10 @@ do_install() { ${QTLIBSPRESERVE} \ -not -name 'libQt5Bootstrap.a' \ -exec rm '{}' ';' + + # Install CMake's toolchain configuration + mkdir -p ${D}${datadir}/cmake/OEToolchainConfig.cmake.d/ + install -m 644 ${WORKDIR}/OEQt5Toolchain.cmake ${D}${datadir}/cmake/OEToolchainConfig.cmake.d/ } do_generate_qt_environment_file() { @@ -252,6 +262,7 @@ do_generate_qt_environment_file() { 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=`qmake -query QT_INSTALL_LIBS`/${QT_DIR_NAME}/mkspecs/qconfig.pri' >> $script + echo 'export OE_QMAKE_PATH_HOST_BINS=${OE_QMAKE_PATH_HOST_BINS}' >> $script echo 'export QMAKESPEC=`qmake -query QT_INSTALL_LIBS`/mkspecs/linux-oe-g++' >> $script # Use relocable sysroot diff --git a/meta-qt5/recipes-qt/qt5/qtbase-git/OEQt5Toolchain.cmake b/meta-qt5/recipes-qt/qt5/qtbase-git/OEQt5Toolchain.cmake new file mode 100644 index 0000000..6f0042b --- /dev/null +++ b/meta-qt5/recipes-qt/qt5/qtbase-git/OEQt5Toolchain.cmake @@ -0,0 +1 @@ +set( OE_QMAKE_PATH_EXTERNAL_HOST_BINS $ENV{OE_QMAKE_PATH_HOST_BINS} ) diff --git a/meta-qt5/recipes-qt/qt5/qtbase/OEQt5Toolchain.cmake b/meta-qt5/recipes-qt/qt5/qtbase/OEQt5Toolchain.cmake new file mode 100644 index 0000000..6f0042b --- /dev/null +++ b/meta-qt5/recipes-qt/qt5/qtbase/OEQt5Toolchain.cmake @@ -0,0 +1 @@ +set( OE_QMAKE_PATH_EXTERNAL_HOST_BINS $ENV{OE_QMAKE_PATH_HOST_BINS} ) -- 2.7.4