aboutsummaryrefslogtreecommitdiffstats
path: root/src/ivicore/doc/src/ivigenerator/qmake-integration.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/ivicore/doc/src/ivigenerator/qmake-integration.qdoc')
-rw-r--r--src/ivicore/doc/src/ivigenerator/qmake-integration.qdoc121
1 files changed, 121 insertions, 0 deletions
diff --git a/src/ivicore/doc/src/ivigenerator/qmake-integration.qdoc b/src/ivicore/doc/src/ivigenerator/qmake-integration.qdoc
new file mode 100644
index 0000000..3085efc
--- /dev/null
+++ b/src/ivicore/doc/src/ivigenerator/qmake-integration.qdoc
@@ -0,0 +1,121 @@
+/****************************************************************************
+**
+** Copyright (C) 2018 Pelagicore AG
+** Contact: https://www.qt.io/licensing/
+**
+** This file is part of the documentation of the QtIvi module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:FDL-QTAS$
+** Commercial License Usage
+** Licensees holding valid commercial Qt Automotive Suite licenses may use
+** this file in accordance with the commercial license agreement provided
+** with the Software or, alternatively, in accordance with the terms
+** contained in a written agreement between you and The Qt Company. For
+** licensing terms and conditions see https://www.qt.io/terms-conditions.
+** For further information use the contact form at https://www.qt.io/contact-us.
+**
+** GNU Free Documentation License Usage
+** Alternatively, this file may be used under the terms of the GNU Free
+** Documentation License version 1.3 as published by the Free Software
+** Foundation and appearing in the file included in the packaging of
+** this file. Please review the following information to ensure
+** the GNU Free Documentation License version 1.3 requirements
+** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+/*!
+\page qmake-integration.html
+\title QMake Integration
+\previouspage Autogenerator usage
+
+Qt IVI Generator has been integrated with QMake to generate all or part of projects.
+
+In it's simplest form, QMake can generate all the source code and the project only
+need to configure what type of project is built.
+
+For complex setups, generated code can be combined with application specific code
+which can extend and use it.
+
+Example:
+\code
+CONFIG += ivigenerator
+
+QT_FOR_CONFIG += ivicore
+!qtConfig(ivigenerator): error("No ivigenerator available")
+
+QFACE_FORMAT = frontend
+QFACE_SOURCES = example.qface
+QFACE_MODULE_NAME = myModule
+QFACE_OUTPUT_DIR = myOutputDir
+\endcode
+
+Available QMake Variables:
+\table
+ \row
+ \li QFACE_FORMAT
+ \li frontend (default), simulator_backend
+ \row
+ \li QFACE_SOURCES
+ \li list of .qface input files
+ \row
+ \li QFACE_MODULE_NAME
+ \li The (optional) name of the module that is using the generated code
+ \row
+ \li QFACE_OUTPUT_DIR
+ \li Output folder where the generated code will be created. The default
+ is to use the current build folder
+\endtable
+
+
+See \l {Autogenerator usage} for more details on the generator command line arguments.
+
+\quotation
+\note As the ivigenerator has specific system dependencies, it may not be available in every QtIviCore installation.
+In this case the ivigenerator qmake feature is also not available and this can result in build errors.
+
+The following code snippet makes sure to stop the build and give a meaningful error message in this case:
+\code
+QT_FOR_CONFIG += ivicore
+!qtConfig(ivigenerator): error("No ivigenerator available")
+\endcode
+\endquotation
+
+\section1 QtModule support
+
+The Qmake Integration also supports generating code which enables you to compile the generated code
+as a qt module. As it needs to work more closely with the Qt's module build system, it shouldn't be
+loaded using the \e CONFIG variable, but using the \e load() function instead. The \e
+ivigenerator_qt_module feature replaces the \e load(qt_module) call. The following shows how the
+integration of the QtIviVehicleFunctions module is done.
+
+\badcode
+TARGET = QtIviVehicleFunctions
+QT = core core-private ivicore ivicore-private
+CONFIG += c++11 ivigenerator
+
+QT_FOR_CONFIG += ivicore
+!qtConfig(ivigenerator): error("No ivigenerator available")
+
+...
+
+QFACE_MODULE_NAME = QtIviVehicleFunctions
+QFACE_SOURCES += ivivehiclefunctions.qface
+
+load(ivigenerator_qt_module)
+\endcode
+
+In addition to the project file for the module library also the \e sync.profile needs to be
+changed, as this is used to call the \e syncqt.pl script which generates the forwarding headers.
+Usually the \e sync.profile is setup to search for the headers in the source folders. Using
+\e $out_basedir it can be extended to also search in the build folder.
+
+\badcode
+...
+%modules = ( # path to module name map
+ "QtIviVehicleFunctions" => "$basedir/src/ivivehiclefunctions;$out_basedir/src/ivivehiclefunctions"
+);
+...
+\endcode
+
+*/