QtAutogen: Add test for empty qrc file
This commit is contained in:
parent
98b11f252c
commit
bcafc399c5
|
@ -44,10 +44,16 @@ else()
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# -- RCC only
|
||||||
add_executable(rcconly rcconly.cpp second_resource.qrc)
|
add_executable(rcconly rcconly.cpp second_resource.qrc)
|
||||||
set_property(TARGET rcconly PROPERTY AUTORCC ON)
|
set_property(TARGET rcconly PROPERTY AUTORCC ON)
|
||||||
target_link_libraries(rcconly ${QT_QTCORE_TARGET})
|
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})
|
include_directories(${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
|
||||||
add_definitions(-DFOO -DSomeDefine="Barx")
|
add_definitions(-DFOO -DSomeDefine="Barx")
|
||||||
|
|
|
@ -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;
|
||||||
|
}
|
|
@ -0,0 +1,4 @@
|
||||||
|
<!DOCTYPE RCC><RCC version="1.0">
|
||||||
|
<qresource>
|
||||||
|
</qresource>
|
||||||
|
</RCC>
|
Loading…
Reference in New Issue