diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx index 2c5dd450d..fcc898a14 100644 --- a/Source/cmQtAutoGenerators.cxx +++ b/Source/cmQtAutoGenerators.cxx @@ -2074,6 +2074,8 @@ bool cmQtAutoGenerators::GenerateQrc() } } + command.push_back("-name"); + command.push_back(basename); command.push_back("-o"); command.push_back(rcc_output_file); command.push_back(*si); diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt index 0821b454d..cf80f411c 100644 --- a/Tests/QtAutogen/CMakeLists.txt +++ b/Tests/QtAutogen/CMakeLists.txt @@ -66,7 +66,7 @@ add_custom_command( add_executable(QtAutogen main.cpp calwidget.cpp foo.cpp blub.cpp bar.cpp abc.cpp xyz.cpp yaf.cpp gadget.cpp $ - test.qrc resourcetester.cpp generated.cpp + test.qrc second_resource.qrc resourcetester.cpp generated.cpp ) set_property(TARGET QtAutogen APPEND PROPERTY AUTOGEN_TARGET_DEPENDS generate_moc_input "${CMAKE_CURRENT_BINARY_DIR}/myotherinterface.h") diff --git a/Tests/QtAutogen/resourcetester.cpp b/Tests/QtAutogen/resourcetester.cpp index 43314e1f8..0c64d80af 100644 --- a/Tests/QtAutogen/resourcetester.cpp +++ b/Tests/QtAutogen/resourcetester.cpp @@ -16,6 +16,8 @@ void ResourceTester::doTest() { if (!QFile::exists(":/CMakeLists.txt")) qApp->exit(EXIT_FAILURE); + if (!QFile::exists(":/main.cpp")) + qApp->exit(EXIT_FAILURE); QTimer::singleShot(0, qApp, SLOT(quit())); } diff --git a/Tests/QtAutogen/second_resource.qrc b/Tests/QtAutogen/second_resource.qrc new file mode 100644 index 000000000..27bfb143b --- /dev/null +++ b/Tests/QtAutogen/second_resource.qrc @@ -0,0 +1,5 @@ + + + main.cpp + +