summaryrefslogtreecommitdiffstats
path: root/Tests/QtAutogenRerun/rccDepends
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/QtAutogenRerun/rccDepends')
-rw-r--r--Tests/QtAutogenRerun/rccDepends/CMakeLists.txt35
-rw-r--r--Tests/QtAutogenRerun/rccDepends/main.cpp5
-rw-r--r--Tests/QtAutogenRerun/rccDepends/res/input1.txt.in1
-rw-r--r--Tests/QtAutogenRerun/rccDepends/res/input2.txt.in1
-rw-r--r--Tests/QtAutogenRerun/rccDepends/res1a.qrc.in5
-rw-r--r--Tests/QtAutogenRerun/rccDepends/res1b.qrc.in6
-rw-r--r--Tests/QtAutogenRerun/rccDepends/res2a.qrc.in5
-rw-r--r--Tests/QtAutogenRerun/rccDepends/res2b.qrc.in6
8 files changed, 64 insertions, 0 deletions
diff --git a/Tests/QtAutogenRerun/rccDepends/CMakeLists.txt b/Tests/QtAutogenRerun/rccDepends/CMakeLists.txt
new file mode 100644
index 0000000..edc0ac3
--- /dev/null
+++ b/Tests/QtAutogenRerun/rccDepends/CMakeLists.txt
@@ -0,0 +1,35 @@
+cmake_minimum_required(VERSION 3.9)
+project(rccDepends CXX)
+
+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(res/input1.txt.in res1/input.txt COPYONLY)
+configure_file(res/input1.txt.in res1/inputAdded.txt COPYONLY)
+configure_file(res/input2.txt.in res2/input.txt COPYONLY)
+configure_file(res/input2.txt.in res2/inputAdded.txt COPYONLY)
+# Dependency generated qrc file
+add_custom_command(OUTPUT res2.qrc
+ DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/res2.qrc.in
+ COMMAND ${CMAKE_COMMAND} -E sleep 2
+ COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/res2.qrc.in ${CMAKE_CURRENT_BINARY_DIR}/res2.qrc
+ )
+
+add_executable(rccDepends
+ main.cpp
+ ${CMAKE_CURRENT_BINARY_DIR}/res1.qrc
+ ${CMAKE_CURRENT_BINARY_DIR}/res2.qrc )
+target_link_libraries(rccDepends ${QT_CORE_TARGET})
+add_custom_command(TARGET rccDepends POST_BUILD COMMAND
+ ${CMAKE_COMMAND} -E echo "$<TARGET_FILE:rccDepends>" > target.txt)
diff --git a/Tests/QtAutogenRerun/rccDepends/main.cpp b/Tests/QtAutogenRerun/rccDepends/main.cpp
new file mode 100644
index 0000000..766b775
--- /dev/null
+++ b/Tests/QtAutogenRerun/rccDepends/main.cpp
@@ -0,0 +1,5 @@
+
+int main()
+{
+ return 0;
+}
diff --git a/Tests/QtAutogenRerun/rccDepends/res/input1.txt.in b/Tests/QtAutogenRerun/rccDepends/res/input1.txt.in
new file mode 100644
index 0000000..da62762
--- /dev/null
+++ b/Tests/QtAutogenRerun/rccDepends/res/input1.txt.in
@@ -0,0 +1 @@
+Res1 input.
diff --git a/Tests/QtAutogenRerun/rccDepends/res/input2.txt.in b/Tests/QtAutogenRerun/rccDepends/res/input2.txt.in
new file mode 100644
index 0000000..08e14b7
--- /dev/null
+++ b/Tests/QtAutogenRerun/rccDepends/res/input2.txt.in
@@ -0,0 +1 @@
+Res2 input.
diff --git a/Tests/QtAutogenRerun/rccDepends/res1a.qrc.in b/Tests/QtAutogenRerun/rccDepends/res1a.qrc.in
new file mode 100644
index 0000000..d111ffb
--- /dev/null
+++ b/Tests/QtAutogenRerun/rccDepends/res1a.qrc.in
@@ -0,0 +1,5 @@
+<RCC>
+ <qresource prefix="/Texts1">
+ <file>res1/input.txt</file>
+ </qresource>
+</RCC>
diff --git a/Tests/QtAutogenRerun/rccDepends/res1b.qrc.in b/Tests/QtAutogenRerun/rccDepends/res1b.qrc.in
new file mode 100644
index 0000000..4cb3f04
--- /dev/null
+++ b/Tests/QtAutogenRerun/rccDepends/res1b.qrc.in
@@ -0,0 +1,6 @@
+<RCC>
+ <qresource prefix="/Texts1">
+ <file>res1/input.txt</file>
+ <file alias="Added">res1/inputAdded.txt</file>
+ </qresource>
+</RCC>
diff --git a/Tests/QtAutogenRerun/rccDepends/res2a.qrc.in b/Tests/QtAutogenRerun/rccDepends/res2a.qrc.in
new file mode 100644
index 0000000..19f34ac
--- /dev/null
+++ b/Tests/QtAutogenRerun/rccDepends/res2a.qrc.in
@@ -0,0 +1,5 @@
+<RCC>
+ <qresource prefix="/Texts2">
+ <file>res2/input.txt</file>
+ </qresource>
+</RCC>
diff --git a/Tests/QtAutogenRerun/rccDepends/res2b.qrc.in b/Tests/QtAutogenRerun/rccDepends/res2b.qrc.in
new file mode 100644
index 0000000..19e8ba1
--- /dev/null
+++ b/Tests/QtAutogenRerun/rccDepends/res2b.qrc.in
@@ -0,0 +1,6 @@
+<RCC>
+ <qresource prefix="/Texts2">
+ <file>res2/input.txt</file>
+ <file alias="Added">res2/inputAdded.txt</file>
+ </qresource>
+</RCC>