diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2018-05-25 09:40:23 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2018-05-30 15:45:01 (GMT) |
commit | 5852acffa4b67a614df3343bcb29e6b9511d0704 (patch) | |
tree | e2ebf4dfe6d6ba3c8b869035019d6c0cee7db52e /Tests/QtAutogen/RerunRccConfigChange/RccConfigChange | |
parent | 41685c8ba0902cff1241886d966e796cecb82ae3 (diff) | |
download | CMake-5852acffa4b67a614df3343bcb29e6b9511d0704.zip CMake-5852acffa4b67a614df3343bcb29e6b9511d0704.tar.gz CMake-5852acffa4b67a614df3343bcb29e6b9511d0704.tar.bz2 |
Autogen: Add AUTORCC configuration change test
Diffstat (limited to 'Tests/QtAutogen/RerunRccConfigChange/RccConfigChange')
8 files changed, 47 insertions, 0 deletions
diff --git a/Tests/QtAutogen/RerunRccConfigChange/RccConfigChange/CMakeLists.txt b/Tests/QtAutogen/RerunRccConfigChange/RccConfigChange/CMakeLists.txt new file mode 100644 index 0000000..3cddf5c --- /dev/null +++ b/Tests/QtAutogen/RerunRccConfigChange/RccConfigChange/CMakeLists.txt @@ -0,0 +1,26 @@ +cmake_minimum_required(VERSION 3.11.2) +project(RccConfigChange) +include("../../AutogenTest.cmake") + +# Enable AUTORCC for all targets +set(CMAKE_AUTORCC ON) + +# Initial resource files setup +configure_file(resGen/input1.txt.in resGen/input1.txt COPYONLY) +configure_file(resGen/input2.txt.in resGen/input2.txt COPYONLY) +configure_file(resGen.qrc.in resGen.qrc COPYONLY) + +# Generated qrc file with dependency +add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/resGen.qrc + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/resGen.qrc.in + COMMAND ${CMAKE_COMMAND} -E sleep 2 + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/resGen.qrc.in ${CMAKE_CURRENT_BINARY_DIR}/resGen.qrc +) + +# Target that uses a plain .qrc file +add_executable(rccConfigChangePlain main.cpp resPlain.qrc) +target_link_libraries(rccConfigChangePlain ${QT_QTCORE_TARGET}) + +# Target that uses a GENERATED .qrc file +add_executable(rccConfigChangeGen main.cpp ${CMAKE_CURRENT_BINARY_DIR}/resGen.qrc ) +target_link_libraries(rccConfigChangeGen ${QT_QTCORE_TARGET}) diff --git a/Tests/QtAutogen/RerunRccConfigChange/RccConfigChange/main.cpp b/Tests/QtAutogen/RerunRccConfigChange/RccConfigChange/main.cpp new file mode 100644 index 0000000..766b775 --- /dev/null +++ b/Tests/QtAutogen/RerunRccConfigChange/RccConfigChange/main.cpp @@ -0,0 +1,5 @@ + +int main() +{ + return 0; +} diff --git a/Tests/QtAutogen/RerunRccConfigChange/RccConfigChange/resGen.qrc.in b/Tests/QtAutogen/RerunRccConfigChange/RccConfigChange/resGen.qrc.in new file mode 100644 index 0000000..9674772 --- /dev/null +++ b/Tests/QtAutogen/RerunRccConfigChange/RccConfigChange/resGen.qrc.in @@ -0,0 +1,6 @@ +<RCC> + <qresource prefix="/TextsGenerated"> + <file>resGen/input1.txt</file> + <file>resGen/input2.txt</file> + </qresource> +</RCC> diff --git a/Tests/QtAutogen/RerunRccConfigChange/RccConfigChange/resGen/input1.txt.in b/Tests/QtAutogen/RerunRccConfigChange/RccConfigChange/resGen/input1.txt.in new file mode 100644 index 0000000..4f24589 --- /dev/null +++ b/Tests/QtAutogen/RerunRccConfigChange/RccConfigChange/resGen/input1.txt.in @@ -0,0 +1 @@ +Generated resource input. diff --git a/Tests/QtAutogen/RerunRccConfigChange/RccConfigChange/resGen/input2.txt.in b/Tests/QtAutogen/RerunRccConfigChange/RccConfigChange/resGen/input2.txt.in new file mode 100644 index 0000000..4f24589 --- /dev/null +++ b/Tests/QtAutogen/RerunRccConfigChange/RccConfigChange/resGen/input2.txt.in @@ -0,0 +1 @@ +Generated resource input. diff --git a/Tests/QtAutogen/RerunRccConfigChange/RccConfigChange/resPlain.qrc b/Tests/QtAutogen/RerunRccConfigChange/RccConfigChange/resPlain.qrc new file mode 100644 index 0000000..e448726 --- /dev/null +++ b/Tests/QtAutogen/RerunRccConfigChange/RccConfigChange/resPlain.qrc @@ -0,0 +1,6 @@ +<RCC> + <qresource prefix="/TextsPlain"> + <file>resPlain/input1.txt</file> + <file>resPlain/input2.txt</file> + </qresource> +</RCC> diff --git a/Tests/QtAutogen/RerunRccConfigChange/RccConfigChange/resPlain/input1.txt b/Tests/QtAutogen/RerunRccConfigChange/RccConfigChange/resPlain/input1.txt new file mode 100644 index 0000000..03969c6 --- /dev/null +++ b/Tests/QtAutogen/RerunRccConfigChange/RccConfigChange/resPlain/input1.txt @@ -0,0 +1 @@ +Plain resource input. diff --git a/Tests/QtAutogen/RerunRccConfigChange/RccConfigChange/resPlain/input2.txt b/Tests/QtAutogen/RerunRccConfigChange/RccConfigChange/resPlain/input2.txt new file mode 100644 index 0000000..03969c6 --- /dev/null +++ b/Tests/QtAutogen/RerunRccConfigChange/RccConfigChange/resPlain/input2.txt @@ -0,0 +1 @@ +Plain resource input. |