summaryrefslogtreecommitdiffstats
path: root/Tests/QtAutogen/rccDepends
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2017-03-02 16:07:53 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2017-03-06 21:01:03 (GMT)
commit9cad44dce264b509afc4b50b540b3a8594cf3217 (patch)
tree074e52f85b4df78745c1bb218f7dfbaa9eec07f7 /Tests/QtAutogen/rccDepends
parent60274e1d94c8409f810332345339de5dd449056b (diff)
downloadCMake-9cad44dce264b509afc4b50b540b3a8594cf3217.zip
CMake-9cad44dce264b509afc4b50b540b3a8594cf3217.tar.gz
CMake-9cad44dce264b509afc4b50b540b3a8594cf3217.tar.bz2
Autogen: Test: Rename autorcc_depends test to rccDepends
Diffstat (limited to 'Tests/QtAutogen/rccDepends')
-rw-r--r--Tests/QtAutogen/rccDepends/CMakeLists.txt27
-rw-r--r--Tests/QtAutogen/rccDepends/res1.qrc.in5
-rw-r--r--Tests/QtAutogen/rccDepends/res1/input.txt.in1
-rw-r--r--Tests/QtAutogen/rccDepends/test_res1.cpp5
4 files changed, 38 insertions, 0 deletions
diff --git a/Tests/QtAutogen/rccDepends/CMakeLists.txt b/Tests/QtAutogen/rccDepends/CMakeLists.txt
new file mode 100644
index 0000000..c983420
--- /dev/null
+++ b/Tests/QtAutogen/rccDepends/CMakeLists.txt
@@ -0,0 +1,27 @@
+cmake_minimum_required(VERSION 3.7)
+project(rccDepends)
+
+set(CMAKE_AUTORCC ON)
+
+if (QT_TEST_VERSION STREQUAL 4)
+ find_package(Qt4 REQUIRED)
+ set(QT_CORE_TARGET Qt4::QtCore)
+else()
+ if (NOT QT_TEST_VERSION STREQUAL 5)
+ message(SEND_ERROR "Invalid Qt version specified.")
+ endif()
+
+ find_package(Qt5Core REQUIRED)
+ set(QT_CORE_TARGET Qt5::Core)
+endif()
+
+configure_file(res1.qrc.in res1.qrc @ONLY)
+configure_file(res1/input.txt.in res1/input.txt @ONLY)
+
+add_executable(test_res1
+ test_res1.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/res1.qrc
+)
+target_link_libraries(test_res1 ${QT_CORE_TARGET})
+add_custom_command(TARGET test_res1 POST_BUILD COMMAND
+ ${CMAKE_COMMAND} -E echo "$<TARGET_FILE:test_res1>" > info_file.txt)
diff --git a/Tests/QtAutogen/rccDepends/res1.qrc.in b/Tests/QtAutogen/rccDepends/res1.qrc.in
new file mode 100644
index 0000000..2a5417b
--- /dev/null
+++ b/Tests/QtAutogen/rccDepends/res1.qrc.in
@@ -0,0 +1,5 @@
+<RCC>
+ <qresource prefix="/">
+ <file>res1/input.txt</file>
+ </qresource>
+</RCC>
diff --git a/Tests/QtAutogen/rccDepends/res1/input.txt.in b/Tests/QtAutogen/rccDepends/res1/input.txt.in
new file mode 100644
index 0000000..da62762
--- /dev/null
+++ b/Tests/QtAutogen/rccDepends/res1/input.txt.in
@@ -0,0 +1 @@
+Res1 input.
diff --git a/Tests/QtAutogen/rccDepends/test_res1.cpp b/Tests/QtAutogen/rccDepends/test_res1.cpp
new file mode 100644
index 0000000..766b775
--- /dev/null
+++ b/Tests/QtAutogen/rccDepends/test_res1.cpp
@@ -0,0 +1,5 @@
+
+int main()
+{
+ return 0;
+}