The test features multiple .cpp and .qrc files with the same name in different subdirectories. This requires AUTOMOC and AUTORCC to generate files with names that respect the path information of the source files.
21 lines
507 B
CMake
21 lines
507 B
CMake
# Test AUTOMOC and AUTORCC on source files with the same name
|
|
# but in different subdirectories
|
|
|
|
add_executable(same_name
|
|
aaa/bbb/item.cpp
|
|
aaa/bbb/data.qrc
|
|
aaa/item.cpp
|
|
aaa/data.qrc
|
|
bbb/aaa/item.cpp
|
|
bbb/aaa/data.qrc
|
|
bbb/item.cpp
|
|
bbb/data.qrc
|
|
ccc/item.cpp
|
|
ccc/data.qrc
|
|
main.cpp
|
|
data.qrc
|
|
)
|
|
target_include_directories(same_name PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
|
|
target_link_libraries(same_name ${QT_LIBRARIES})
|
|
set_target_properties( same_name PROPERTIES AUTOMOC TRUE AUTORCC TRUE )
|