summaryrefslogtreecommitdiffstats
path: root/tests/auto/cmake/test_interface/main.cpp
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2012-11-05 15:18:14 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-03-27 14:54:49 +0100
commitec37cdbc8016042afcd3a77cebe4b3e6b8238092 (patch)
treeac04e54f3bf7199b36c9123a0de2993489e1cba6 /tests/auto/cmake/test_interface/main.cpp
parent70115a81075da9f50849b50dc37a333a18498c2d (diff)
Populate includes, defines and pic flags in target interfaces.
Used by features in CMake 2.8.11. This matches the features in FindQt4 in that version of CMake, namely that the IMPORTED targets contain the appropriate INTERFACE_INCLUDE_DIRECTORIES and INTERFACE_COMPILE_DEFINITIONS and that the qtmain.lib static library is automatically linked to on Windows by executables. Additionally, the INTERFACE_POSITION_INDEPENDENT_CODE property is set appropriately if Qt requires users to use position independent code. Change-Id: Ide341f43fcaf7d722a7bdf1a12b1071c7e548ccc Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'tests/auto/cmake/test_interface/main.cpp')
-rw-r--r--tests/auto/cmake/test_interface/main.cpp58
1 files changed, 58 insertions, 0 deletions
diff --git a/tests/auto/cmake/test_interface/main.cpp b/tests/auto/cmake/test_interface/main.cpp
new file mode 100644
index 0000000000..c1d699219b
--- /dev/null
+++ b/tests/auto/cmake/test_interface/main.cpp
@@ -0,0 +1,58 @@
+/****************************************************************************
+**
+** Copyright (C) 2012 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com, author Stephen Kelly <stephen.kelly@kdab.com>
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL$
+** Commercial License Usage
+** Licensees holding valid commercial Qt 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 Digia. For licensing terms and
+** conditions see http://qt.digia.com/licensing. For further information
+** use the contact form at http://qt.digia.com/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 2.1 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 2.1 requirements
+** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
+**
+** In addition, as a special exception, Digia gives you certain additional
+** rights. These rights are described in the Digia Qt LGPL Exception
+** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 3.0 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 3.0 requirements will be
+** met: http://www.gnu.org/copyleft/gpl.html.
+**
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QApplication>
+
+#include "mainwindow.h"
+
+#if !defined(QT_CORE_LIB) || !defined(QT_GUI_LIB) || !defined(QT_WIDGETS_LIB)
+#error Missing module definitions
+#endif
+
+int main(int argc, char **argv)
+{
+ QApplication app(argc, argv);
+
+ MainWindow mw;
+ mw.show();
+
+ return app.exec();
+}