diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2017-12-09 12:30:54 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2017-12-13 12:50:18 (GMT) |
commit | b1504f9f97849777f4690565f8b5879372e7dd51 (patch) | |
tree | 320510b9093aa093e4e16a7544a99b943a1d32a0 /Tests/QtAutogen/RerunRccDepends/RccDepends/CMakeLists.txt | |
parent | e9fcd1545facf6300181db843260008e1069c7b4 (diff) | |
download | CMake-b1504f9f97849777f4690565f8b5879372e7dd51.zip CMake-b1504f9f97849777f4690565f8b5879372e7dd51.tar.gz CMake-b1504f9f97849777f4690565f8b5879372e7dd51.tar.bz2 |
Autogen: Tests: Separate RerunRccDepends test
Diffstat (limited to 'Tests/QtAutogen/RerunRccDepends/RccDepends/CMakeLists.txt')
-rw-r--r-- | Tests/QtAutogen/RerunRccDepends/RccDepends/CMakeLists.txt | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Tests/QtAutogen/RerunRccDepends/RccDepends/CMakeLists.txt b/Tests/QtAutogen/RerunRccDepends/RccDepends/CMakeLists.txt new file mode 100644 index 0000000..0507e61 --- /dev/null +++ b/Tests/QtAutogen/RerunRccDepends/RccDepends/CMakeLists.txt @@ -0,0 +1,33 @@ +cmake_minimum_required(VERSION 3.10) +project(RccDepends) +include("../../AutogenTest.cmake") + +# Enable AUTORCC for all targets +set(CMAKE_AUTORCC ON) + +# Initial resource files setup +configure_file(resPlain/input.txt.in resPlain/input.txt COPYONLY) +configure_file(resPlain/input.txt.in resPlain/inputAdded.txt COPYONLY) +configure_file(resGen/input.txt.in resGen/input.txt COPYONLY) +configure_file(resGen/input.txt.in resGen/inputAdded.txt COPYONLY) + +# Generated qrc file with dependency +add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/resGen.qrc + DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/resGen.qrc.in + COMMAND ${CMAKE_COMMAND} -E sleep 2 + COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/resGen.qrc.in ${CMAKE_CURRENT_BINARY_DIR}/resGen.qrc +) + +# Target that uses a plain .qrc file +add_executable(rccDependsPlain main.cpp ${CMAKE_CURRENT_BINARY_DIR}/resPlain.qrc) +target_link_libraries(rccDependsPlain ${QT_QTCORE_TARGET}) +add_custom_command(TARGET rccDependsPlain POST_BUILD COMMAND + ${CMAKE_COMMAND} -E echo "$<TARGET_FILE:rccDependsPlain>" > targetPlain.txt +) + +# Target that uses a GENERATED .qrc file +add_executable(rccDependsGen main.cpp ${CMAKE_CURRENT_BINARY_DIR}/resGen.qrc ) +target_link_libraries(rccDependsGen ${QT_QTCORE_TARGET}) +add_custom_command(TARGET rccDependsGen POST_BUILD COMMAND + ${CMAKE_COMMAND} -E echo "$<TARGET_FILE:rccDependsGen>" > targetGen.txt +) |