summaryrefslogtreecommitdiffstats
path: root/coin/instructions/qmake
diff options
context:
space:
mode:
Diffstat (limited to 'coin/instructions/qmake')
-rw-r--r--coin/instructions/qmake/call_make.yaml55
-rw-r--r--coin/instructions/qmake/ensure_pro_file.cmake19
-rw-r--r--coin/instructions/qmake/get_qmake_location_host.yaml16
-rw-r--r--coin/instructions/qmake/get_qmake_location_target.yaml29
4 files changed, 119 insertions, 0 deletions
diff --git a/coin/instructions/qmake/call_make.yaml b/coin/instructions/qmake/call_make.yaml
new file mode 100644
index 0000000000..59babe9e0c
--- /dev/null
+++ b/coin/instructions/qmake/call_make.yaml
@@ -0,0 +1,55 @@
+type: Group
+instructions:
+ # Call jom when host os is Windows + MSVC
+ - type: Group
+ instructions:
+ # Clear the automatically set MAKEFLAGS variable
+ - type: EnvironmentVariable
+ variableName: MAKEFLAGS
+ variableValue: ""
+ # Call jom
+ - type: ExecuteCommand
+ command: "{{.Env.ENV_PREFIX}} {{.Env.CI_JOM_PATH}}\\jom.exe"
+ executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution
+ maxTimeInSeconds: 6000
+ maxTimeBetweenOutput: 1200
+ userMessageOnFailure: >
+ Failed to call jom.
+ enable_if:
+ condition: and
+ conditions:
+ - condition: property
+ property: host.os
+ equals_value: Windows
+ - condition: property
+ property: host.compiler
+ not_contains_value: "Mingw"
+ # Call make when host os is not Windows (Linux, macOS)
+ - type: ExecuteCommand
+ command: "{{.Env.CALL_MAKE_ENV_PREFIX}} make"
+ executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution
+ maxTimeInSeconds: 6000
+ maxTimeBetweenOutput: 1200
+ userMessageOnFailure: >
+ Failed to call make.
+ enable_if:
+ condition: property
+ property: target.os
+ not_equals_value: Windows
+ # Call mingw32-make when host os is Windows + MinGW (this includes building for Android)
+ - type: ExecuteCommand
+ command: "{{.Env.CALL_MAKE_ENV_PREFIX}} mingw32-make"
+ executeCommandArgumentSplitingBehavior: SplitAfterVariableSubstitution
+ maxTimeInSeconds: 6000
+ maxTimeBetweenOutput: 1200
+ userMessageOnFailure: >
+ Failed to call mingw32-make.
+ enable_if:
+ condition: and
+ conditions:
+ - condition: property
+ property: host.os
+ equals_value: Windows
+ - condition: property
+ property: host.compiler
+ contains_value: "Mingw"
diff --git a/coin/instructions/qmake/ensure_pro_file.cmake b/coin/instructions/qmake/ensure_pro_file.cmake
new file mode 100644
index 0000000000..d879128601
--- /dev/null
+++ b/coin/instructions/qmake/ensure_pro_file.cmake
@@ -0,0 +1,19 @@
+# Copyright (C) 2022 The Qt Company Ltd.
+# SPDX-License-Identifier: BSD-3-Clause
+
+# CMake script to ensure that a qmake project file exists.
+#
+# Usage: cmake -DPRO_FILE=.../project.pro -P .../ensure_pro_file.cmake
+#
+# This script checks for existence of ${PRO_FILE} and creates a fake one, if needed.
+#
+
+if(NOT EXISTS "${PRO_FILE}")
+ get_filename_component(dir "${PRO_FILE}" DIRECTORY)
+ if(NOT IS_DIRECTORY "${dir}")
+ file(MAKE_DIRECTORY "${dir}")
+ endif()
+
+ file(WRITE "${PRO_FILE}" "TEMPLATE = aux
+")
+endif()
diff --git a/coin/instructions/qmake/get_qmake_location_host.yaml b/coin/instructions/qmake/get_qmake_location_host.yaml
new file mode 100644
index 0000000000..e43602a9a2
--- /dev/null
+++ b/coin/instructions/qmake/get_qmake_location_host.yaml
@@ -0,0 +1,16 @@
+type: Group
+instructions:
+ - type: EnvironmentVariable
+ variableName: COIN_QMAKE_LOCATION
+ variableValue: "{{.InstallDir}}\\bin\\qmake"
+ enable_if:
+ condition: property
+ property: host.os
+ equals_value: Windows
+ - type: EnvironmentVariable
+ variableName: COIN_QMAKE_LOCATION
+ variableValue: "{{.InstallDir}}/bin/qmake"
+ disable_if:
+ condition: property
+ property: host.os
+ equals_value: Windows
diff --git a/coin/instructions/qmake/get_qmake_location_target.yaml b/coin/instructions/qmake/get_qmake_location_target.yaml
new file mode 100644
index 0000000000..13940bdad2
--- /dev/null
+++ b/coin/instructions/qmake/get_qmake_location_target.yaml
@@ -0,0 +1,29 @@
+type: Group
+instructions:
+ - type: EnvironmentVariable
+ variableName: COIN_QMAKE_LOCATION
+ variableValue: "{{.InstallDir}}\\target\\bin\\qmake.bat"
+ enable_if:
+ condition: property
+ property: host.os
+ equals_value: Windows
+ - type: Group
+ disable_if:
+ condition: property
+ property: host.os
+ equals_value: Windows
+ instructions:
+ - type: EnvironmentVariable
+ variableName: COIN_QMAKE_LOCATION
+ variableValue: "{{.InstallDir}}/target/bin/qmake"
+ disable_if:
+ condition: property
+ property: target.osVersion
+ equals_value: QEMU
+ - type: EnvironmentVariable
+ variableName: COIN_QMAKE_LOCATION
+ variableValue: "{{.InstallDir}}/target/bin/host-qmake"
+ enable_if:
+ condition: property
+ property: target.osVersion
+ equals_value: QEMU