summaryrefslogtreecommitdiffstats
path: root/meta-boot2qt/files/qbsp/toolchain_installscript.qs
diff options
context:
space:
mode:
authorSamuli Piippo <samuli.piippo@qt.io>2018-10-25 15:05:08 +0300
committerSamuli Piippo <samuli.piippo@qt.io>2018-10-30 08:12:14 +0000
commitc6cf6f303ad64f3243c4541e3d4ab5957326ad38 (patch)
tree7c890bbeaf522003bfe518eaa33b56dca1cb3e1c /meta-boot2qt/files/qbsp/toolchain_installscript.qs
parentda8985fae240e7cf189a1376a6c7593656a024da (diff)
downloadmeta-boot2qt-c6cf6f303ad64f3243c4541e3d4ab5957326ad38.tar.gz
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 <mikko.gronoff@qt.io>
Diffstat (limited to 'meta-boot2qt/files/qbsp/toolchain_installscript.qs')
-rw-r--r--meta-boot2qt/files/qbsp/toolchain_installscript.qs18
1 files changed, 18 insertions, 0 deletions
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()
56 component.addOperation("Replace", 56 component.addOperation("Replace",
57 path + "/sysroots/i686-pokysdk-mingw32/usr/bin/qt.conf", 57 path + "/sysroots/i686-pokysdk-mingw32/usr/bin/qt.conf",
58 sdkPath, path); 58 sdkPath, path);
59 component.addOperation("Replace",
60 path + "/sysroots/i686-pokysdk-mingw32/usr/share/cmake/OEToolchainConfig.cmake.d/" + device + ".cmake",
61 sdkPath, path);
59 } 62 }
60 var basecomponent = component.name.substring(0, component.name.lastIndexOf(".")); 63 var basecomponent = component.name.substring(0, component.name.lastIndexOf("."));
61 var toolchainId = "ProjectExplorer.ToolChain.Gcc:" + component.name; 64 var toolchainId = "ProjectExplorer.ToolChain.Gcc:" + component.name;
62 var debuggerId = basecomponent + ".gdb"; 65 var debuggerId = basecomponent + ".gdb";
63 var qtId = basecomponent + ".qt"; 66 var qtId = basecomponent + ".qt";
67 var cmakeId = basecomponent + ".cmake";
64 var icon = installer.value("B2QtDeviceIcon"); 68 var icon = installer.value("B2QtDeviceIcon");
65 var executableExt = ""; 69 var executableExt = "";
66 var hostSysroot = "x86_64-pokysdk-linux"; 70 var hostSysroot = "x86_64-pokysdk-linux";
67 if (systemInfo.kernelType === "winnt") { 71 if (systemInfo.kernelType === "winnt") {
68 executableExt = ".exe"; 72 executableExt = ".exe";
69 hostSysroot = "i686-pokysdk-mingw32"; 73 hostSysroot = "i686-pokysdk-mingw32";
74 toolchainId = "ProjectExplorer.ToolChain.Mingw:" + component.name;
70 } 75 }
71 76
72 component.addOperation("Execute", 77 component.addOperation("Execute",
@@ -109,6 +114,14 @@ Component.prototype.createOperations = function()
109 "@SDKToolBinary@", "rmQt", "--id", qtId]); 114 "@SDKToolBinary@", "rmQt", "--id", qtId]);
110 115
111 component.addOperation("Execute", 116 component.addOperation("Execute",
117 ["@SDKToolBinary@", "addCMake",
118 "--id", cmakeId,
119 "--name", "CMake (" + platform + " " + target + ")",
120 "--path", path + "/sysroots/" + hostSysroot + "/usr/bin/cmake" + executableExt,
121 "UNDOEXECUTE",
122 "@SDKToolBinary@", "rmCMake", "--id", cmakeId]);
123
124 component.addOperation("Execute",
112 ["@SDKToolBinary@", "addKit", 125 ["@SDKToolBinary@", "addKit",
113 "--id", basecomponent, 126 "--id", basecomponent,
114 "--name", platform + " " + target, 127 "--name", platform + " " + target,
@@ -120,6 +133,11 @@ Component.prototype.createOperations = function()
120 "--Ctoolchain", toolchainId + ".gcc", 133 "--Ctoolchain", toolchainId + ".gcc",
121 "--Cxxtoolchain", toolchainId + ".g++", 134 "--Cxxtoolchain", toolchainId + ".g++",
122 "--icon", icon, 135 "--icon", icon,
136 "--cmake", cmakeId,
137 "--cmake-config", "CMAKE_TOOLCHAIN_FILE:FILEPATH=" + path + "/sysroots/" + hostSysroot + "/usr/share/cmake/OEToolchainConfig.cmake",
138 "--cmake-config", "CMAKE_MAKE_PROGRAM:FILEPATH=" + path + "/sysroots/" + hostSysroot + "/usr/bin/make" + executableExt,
139 "--cmake-config", "CMAKE_CXX_COMPILER:FILEPATH=" + path + "/sysroots/" + hostSysroot + "/usr/bin/" + target_sys + "/" + target_sys + "-g++" + executableExt,
140 "--cmake-config", "CMAKE_C_COMPILER:FILEPATH=" + path + "/sysroots/" + hostSysroot + "/usr/bin/" + target_sys + "/" + target_sys + "-gcc" + executableExt,
123 "UNDOEXECUTE", 141 "UNDOEXECUTE",
124 "@SDKToolBinary@", "rmKit", "--id", basecomponent]); 142 "@SDKToolBinary@", "rmKit", "--id", basecomponent]);
125} 143}