summaryrefslogtreecommitdiffstats
path: root/tests/auto/cmake/test_add_binary_resources_delayed_file/main.cpp
diff options
context:
space:
mode:
authorA. Klitzing <aklitzing@gmail.com>2014-11-13 11:01:31 +0100
committerAndré Klitzing <aklitzing@gmail.com>2015-02-11 20:59:35 +0000
commit2af127763194c13c3f7ccce507c94eb2de6dbefe (patch)
tree2c4b8e2dbde9d4fbbb0b01b910bd28631060c6b3 /tests/auto/cmake/test_add_binary_resources_delayed_file/main.cpp
parent83a5694dc21b8220bb0e5c85f24a53361b2fd478 (diff)
CMake: Introduce qt5_add_binary_resources
Optional parameter DESTINATION to set target rcc file Example: qt5_add_binary_resources(GenerateFixture "fixture.qrc") Task-number: QTBUG-41728 Change-Id: I9dc2fe8e7d5e9ad3873b89f75ab84a2a1b9d1d29 Reviewed-by: Stephen Kelly <steveire@gmail.com>
Diffstat (limited to 'tests/auto/cmake/test_add_binary_resources_delayed_file/main.cpp')
-rw-r--r--tests/auto/cmake/test_add_binary_resources_delayed_file/main.cpp46
1 files changed, 46 insertions, 0 deletions
diff --git a/tests/auto/cmake/test_add_binary_resources_delayed_file/main.cpp b/tests/auto/cmake/test_add_binary_resources_delayed_file/main.cpp
new file mode 100644
index 0000000000..86a3ecdcd6
--- /dev/null
+++ b/tests/auto/cmake/test_add_binary_resources_delayed_file/main.cpp
@@ -0,0 +1,46 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 André Klitzing <aklitzing@gmail.com>
+** Contact: http://www.qt-project.org/legal
+**
+** This file is part of the test suite of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL21$
+** 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 or version 3 as published by the Free
+** Software Foundation and appearing in the file LICENSE.LGPLv21 and
+** LICENSE.LGPLv3 included in the packaging of this file. Please review the
+** following information to ensure the GNU Lesser General Public License
+** requirements will be met: https://www.gnu.org/licenses/lgpl.html and
+** 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.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+
+#include <QFile>
+#include <QResource>
+
+int main(int argc, char **argv)
+{
+ if (QResource::registerResource("rcc_file.rcc") &&
+ QFile::exists("://resource_file.txt") && QFile::exists("://resource_file_two.txt"))
+ {
+ return 0;
+ }
+
+ return -1;
+}