summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
Diffstat (limited to 'Tests')
-rw-r--r--Tests/QtAutogen/CMakeLists.txt6
-rw-r--r--Tests/QtAutogen/rcc_empty.cpp9
-rw-r--r--Tests/QtAutogen/rcc_empty_resource.qrc4
3 files changed, 19 insertions, 0 deletions
diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt
index e35e1d1..c713d1c 100644
--- a/Tests/QtAutogen/CMakeLists.txt
+++ b/Tests/QtAutogen/CMakeLists.txt
@@ -44,10 +44,16 @@ else()
endif()
+# -- RCC only
add_executable(rcconly rcconly.cpp second_resource.qrc)
set_property(TARGET rcconly PROPERTY AUTORCC ON)
target_link_libraries(rcconly ${QT_QTCORE_TARGET})
+# -- RCC empty
+add_executable(rcc_empty rcc_empty.cpp rcc_empty_resource.qrc)
+set_property(TARGET rcc_empty PROPERTY AUTORCC ON)
+target_link_libraries(rcc_empty ${QT_QTCORE_TARGET})
+
include_directories(${CMAKE_CURRENT_BINARY_DIR})
add_definitions(-DFOO -DSomeDefine="Barx")
diff --git a/Tests/QtAutogen/rcc_empty.cpp b/Tests/QtAutogen/rcc_empty.cpp
new file mode 100644
index 0000000..3f9f9a2
--- /dev/null
+++ b/Tests/QtAutogen/rcc_empty.cpp
@@ -0,0 +1,9 @@
+
+extern int qInitResources_rcc_empty_resource();
+
+int main(int, char**)
+{
+ // Fails to link if the symbol is not present.
+ qInitResources_rcc_empty_resource();
+ return 0;
+}
diff --git a/Tests/QtAutogen/rcc_empty_resource.qrc b/Tests/QtAutogen/rcc_empty_resource.qrc
new file mode 100644
index 0000000..4ca9cd5
--- /dev/null
+++ b/Tests/QtAutogen/rcc_empty_resource.qrc
@@ -0,0 +1,4 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+</qresource>
+</RCC>