Commit 261acd91 authored by Stephen Kelly's avatar Stephen Kelly
Browse files

QtAutogen: Use the basename for resource files.

The rcc tool generates a cpp file with a symbol called qInitResources
or called qInitResources_${name}, if the name is passed. The
qInitResources symbol clashes if multiple qrc files are used in
one target.

Always pass the name to ensure that the symbol is unique. This is also
the behavior of the qtx_add_resource macros.
parent 6a85d624
......@@ -2074,6 +2074,8 @@ bool cmQtAutoGenerators::GenerateQrc()
......@@ -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 $<TARGET_OBJECTS:privateSlot>
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")
......@@ -16,6 +16,8 @@ void ResourceTester::doTest()
if (!QFile::exists(":/CMakeLists.txt"))
if (!QFile::exists(":/main.cpp"))
QTimer::singleShot(0, qApp, SLOT(quit()));
<!DOCTYPE RCC><RCC version="1.0">
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment