summaryrefslogtreecommitdiffstats
path: root/Packaging/QtSDK/qt.tools.cmake.xx.qs.in
diff options
context:
space:
mode:
authorKonstantin Podsvirov <konstantin@podsvirov.pro>2016-11-24 10:58:10 (GMT)
committerKonstantin Podsvirov <konstantin@podsvirov.pro>2016-11-30 18:57:35 (GMT)
commit6eb78af2bab552523a0c7ec29c632ffd1d145bfe (patch)
treea7e1bd740d78fb7928015514bc98d8958a839227 /Packaging/QtSDK/qt.tools.cmake.xx.qs.in
parentf2035cbd0d631698ec911e72d0d857fd32d2db7a (diff)
downloadCMake-6eb78af2bab552523a0c7ec29c632ffd1d145bfe.zip
CMake-6eb78af2bab552523a0c7ec29c632ffd1d145bfe.tar.gz
CMake-6eb78af2bab552523a0c7ec29c632ffd1d145bfe.tar.bz2
QtIFW: Packaging as part of the QtSDK
Usage: 'cmake ... -C Packaging/QtSDK/ToolsCMakeXX.cmake ...' to make compatible package.
Diffstat (limited to 'Packaging/QtSDK/qt.tools.cmake.xx.qs.in')
-rw-r--r--Packaging/QtSDK/qt.tools.cmake.xx.qs.in48
1 files changed, 48 insertions, 0 deletions
diff --git a/Packaging/QtSDK/qt.tools.cmake.xx.qs.in b/Packaging/QtSDK/qt.tools.cmake.xx.qs.in
new file mode 100644
index 0000000..cb42a71
--- /dev/null
+++ b/Packaging/QtSDK/qt.tools.cmake.xx.qs.in
@@ -0,0 +1,48 @@
+/****************************************************************************
+**
+** Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+** file Copyright.txt or https://cmake.org/licensing for details.
+**
+****************************************************************************/
+
+// constructor
+function Component()
+{
+ installer.valueChanged.connect( this, Component.prototype.reactOnTargetDirChange );
+ // set the default values to CMAKE@CM_VER_XY@_DIR
+ Component.prototype.reactOnTargetDirChange("TargetDir", installer.value("TargetDir"));
+}
+
+Component.prototype.reactOnTargetDirChange = function(key, value)
+{
+ if (key == "TargetDir") {
+ var path = value + "/@CM_INST_PREF@";
+ installer.setValue("CMAKE@CM_VER_XY@_DIR", path.replace(/\\/g, "/"));
+ }
+}
+
+Component.prototype.createOperations = function()
+{
+ component.createOperations();
+
+ if (installer.value("os") == "win") {
+ try {
+ if (installer.value("SDKToolBinary") == "")
+ return;
+
+ var cmId = component.name;
+ installer.setValue("CMAKE@CM_VER_XY@_ID", cmId);
+
+ component.addOperation("Execute",
+ ["{0,2}", "@SDKToolBinary@", "addCMake",
+ "--id", cmId,
+ "--name", "@CMake_IFW_ROOT_COMPONENT_DISPLAY_NAME@",
+ "--path", "@CM_VER_XY_DIR@/bin/cmake.exe",
+ "UNDOEXECUTE",
+ "@SDKToolBinary@", "rmCMake", "--id", cmId]);
+
+ } catch( e ) {
+ print( e );
+ }
+ }
+}