summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominik Holland <dominik.holland@pelagicore.com>2017-07-05 14:08:01 +0200
committerDominik Holland <dominik.holland@pelagicore.com>2017-07-17 10:43:00 +0000
commit0a952f70c3cca5cce928c8e6d3c511d069da7d43 (patch)
treea9992df5eb68f517d568e6a2704bd647d7ce37ea
parentde5f7fd1d59d732409d1024b20ab8b816009ff0c (diff)
downloadqtivi-0a952f70c3cca5cce928c8e6d3c511d069da7d43.tar.gz
qtivicore: Introduce some more configuration options
two more command-line options are introduced. These are needed to make yocto builds work and also only build whats really needed. --host-tools-only: This option will only build the host-tools (currently only the ivigenerator) --no/qt/system-ivigenerator: This will enable or disable the ivigenerator build. If the system option is used the ivigenerator is considered to be already part of Qt and is not build again. Instead the system ivigenerator is used for the code generation inside the module Change-Id: I68d9e7dec2c3a49552122f47b574211698031b55 Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
-rw-r--r--mkspecs/mkspecs.pro5
-rw-r--r--src/ivicore/configure.json25
-rw-r--r--src/src.pro38
-rw-r--r--src/tools/tools.pro5
4 files changed, 47 insertions, 26 deletions
diff --git a/mkspecs/mkspecs.pro b/mkspecs/mkspecs.pro
index a778415..1c6be92 100644
--- a/mkspecs/mkspecs.pro
+++ b/mkspecs/mkspecs.pro
@@ -1,4 +1,5 @@
TEMPLATE = subdirs
-QT_FOR_CONFIG += ivicore
-qtConfig(ivigenerator): SUBDIRS += features
+include($$QTIVI_BUILD_ROOT/src/ivicore/qtivicore-config.pri)
+QT_FOR_CONFIG += ivicore ivicore-private
+qtConfig(ivigenerator): !qtConfig(system-ivigenerator): SUBDIRS += features
diff --git a/src/ivicore/configure.json b/src/ivicore/configure.json
index 1d67a03..a1f44da 100644
--- a/src/ivicore/configure.json
+++ b/src/ivicore/configure.json
@@ -2,6 +2,13 @@
"module": "ivicore",
"testDir": "../../config.tests",
+ "commandline": {
+ "options": {
+ "ivigenerator": { "type": "enum", "values": [ "no", "qt", "system" ] },
+ "host-tools-only": "boolean"
+ }
+ },
+
"tests": {
"python3": {
"label": "Python3",
@@ -30,13 +37,23 @@
"condition": "features.python3 && tests.virtualenv",
"output": [ "privateFeature" ]
},
+ "system-ivigenerator": {
+ "label": "System IVI Generator",
+ "enable": "input.ivigenerator == 'system'",
+ "disable": "input.ivigenerator != 'system'",
+ "output": [ "privateFeature" ]
+ },
"ivigenerator": {
"label": "IVI Generator",
- "condition": [
- "features.python3",
- "features.python3-virtualenv"
- ],
+ "enable": "input.ivigenerator == 'qt' || input.ivigenerator == 'system'",
+ "disable": "input.ivigenerator == 'no'",
+ "condition": "features.python3.&& features.python3-virtualenv || features.system-ivigenerator",
"output": [ "publicFeature" ]
+ },
+ "host-tools-only": {
+ "label": "Only build the host tools",
+ "condition": "input.host-tools-only == 'yes'",
+ "output": [ "privateFeature" ]
}
},
diff --git a/src/src.pro b/src/src.pro
index dd37da5..3ce737c 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -3,22 +3,30 @@ TEMPLATE = subdirs
# Include the config.pri from the build folder as the qtgenivieextras-config.pri is copied
# while syncqt is running for the module and this is not done yet.
include($$OUT_PWD/geniviextras/qtgeniviextras-config.pri)
-QT_FOR_CONFIG += geniviextras-private
+include($$OUT_PWD/ivicore/qtivicore-config.pri)
+QT_FOR_CONFIG += geniviextras-private ivicore ivicore-private
-!qtConfig(geniviextras-only) {
- SUBDIRS = ivicore \
- ivivehiclefunctions \
- ivimedia \
- plugins \
- imports \
- doc \
- tools
+!qtConfig(host-tools-only) {
+ !qtConfig(geniviextras-only) {
+ SUBDIRS = ivicore \
+ ivivehiclefunctions \
+ ivimedia \
+ plugins \
+ imports \
+ doc \
- ivivehiclefunctions.depends = ivicore
- ivimedia.depends = ivicore
- plugins.depends = ivivehiclefunctions ivimedia
- imports.depends = ivivehiclefunctions ivimedia
- tools.depends = ivicore
+ ivivehiclefunctions.depends = ivicore
+ ivimedia.depends = ivicore
+ plugins.depends = ivivehiclefunctions ivimedia
+ imports.depends = ivivehiclefunctions ivimedia
+ }
+
+ qtConfig(dlt): SUBDIRS += geniviextras
+}
+
+!qtConfig(geniviextras-only): qtConfig(ivigenerator): !qtConfig(system-ivigenerator) {
+ src_tools_ivigenerator.subdir = tools/ivigenerator
+ src_tools_ivigenerator.target = sub-ivigenerator
+ SUBDIRS += src_tools_ivigenerator
}
-qtConfig(dlt): SUBDIRS += geniviextras
diff --git a/src/tools/tools.pro b/src/tools/tools.pro
deleted file mode 100644
index 449f3a8..0000000
--- a/src/tools/tools.pro
+++ /dev/null
@@ -1,5 +0,0 @@
-TEMPLATE = subdirs
-
-QT_FOR_CONFIG += ivicore
-
-qtConfig(ivigenerator): SUBDIRS = ivigenerator