From c6cf6f303ad64f3243c4541e3d4ab5957326ad38 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Thu, 25 Oct 2018 15:05:08 +0300 Subject: cmake: fix cmake configurations for QtCreator Include cmake and make as explicitly to the toolchain. Fix nativesdk-cmake compilation for mingw toolchain. Add CMake registration code to the QBSP installer scripts. Task-number: QTBUG-71315 Change-Id: If29e12d6ce24546ba8a834969b6f60e3216e6962 Reviewed-by: Mikko Gronoff --- meta-boot2qt/files/qbsp/toolchain_installscript.qs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'meta-boot2qt/files/qbsp/toolchain_installscript.qs') diff --git a/meta-boot2qt/files/qbsp/toolchain_installscript.qs b/meta-boot2qt/files/qbsp/toolchain_installscript.qs index 7cef6bc..feee04d 100644 --- a/meta-boot2qt/files/qbsp/toolchain_installscript.qs +++ b/meta-boot2qt/files/qbsp/toolchain_installscript.qs @@ -56,17 +56,22 @@ Component.prototype.createOperations = function() component.addOperation("Replace", path + "/sysroots/i686-pokysdk-mingw32/usr/bin/qt.conf", sdkPath, path); + component.addOperation("Replace", + path + "/sysroots/i686-pokysdk-mingw32/usr/share/cmake/OEToolchainConfig.cmake.d/" + device + ".cmake", + sdkPath, path); } var basecomponent = component.name.substring(0, component.name.lastIndexOf(".")); var toolchainId = "ProjectExplorer.ToolChain.Gcc:" + component.name; var debuggerId = basecomponent + ".gdb"; var qtId = basecomponent + ".qt"; + var cmakeId = basecomponent + ".cmake"; var icon = installer.value("B2QtDeviceIcon"); var executableExt = ""; var hostSysroot = "x86_64-pokysdk-linux"; if (systemInfo.kernelType === "winnt") { executableExt = ".exe"; hostSysroot = "i686-pokysdk-mingw32"; + toolchainId = "ProjectExplorer.ToolChain.Mingw:" + component.name; } component.addOperation("Execute", @@ -108,6 +113,14 @@ Component.prototype.createOperations = function() "UNDOEXECUTE", "@SDKToolBinary@", "rmQt", "--id", qtId]); + component.addOperation("Execute", + ["@SDKToolBinary@", "addCMake", + "--id", cmakeId, + "--name", "CMake (" + platform + " " + target + ")", + "--path", path + "/sysroots/" + hostSysroot + "/usr/bin/cmake" + executableExt, + "UNDOEXECUTE", + "@SDKToolBinary@", "rmCMake", "--id", cmakeId]); + component.addOperation("Execute", ["@SDKToolBinary@", "addKit", "--id", basecomponent, @@ -120,6 +133,11 @@ Component.prototype.createOperations = function() "--Ctoolchain", toolchainId + ".gcc", "--Cxxtoolchain", toolchainId + ".g++", "--icon", icon, + "--cmake", cmakeId, + "--cmake-config", "CMAKE_TOOLCHAIN_FILE:FILEPATH=" + path + "/sysroots/" + hostSysroot + "/usr/share/cmake/OEToolchainConfig.cmake", + "--cmake-config", "CMAKE_MAKE_PROGRAM:FILEPATH=" + path + "/sysroots/" + hostSysroot + "/usr/bin/make" + executableExt, + "--cmake-config", "CMAKE_CXX_COMPILER:FILEPATH=" + path + "/sysroots/" + hostSysroot + "/usr/bin/" + target_sys + "/" + target_sys + "-g++" + executableExt, + "--cmake-config", "CMAKE_C_COMPILER:FILEPATH=" + path + "/sysroots/" + hostSysroot + "/usr/bin/" + target_sys + "/" + target_sys + "-gcc" + executableExt, "UNDOEXECUTE", "@SDKToolBinary@", "rmKit", "--id", basecomponent]); } -- cgit v1.2.3-54-g00ecf