You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
1.0 KiB
40 lines
1.0 KiB
7 years ago
|
cmake_minimum_required(VERSION 3.10)
|
||
|
project(SameName)
|
||
|
include("../AutogenTest.cmake")
|
||
|
|
||
8 years ago
|
# Test AUTOMOC and AUTORCC on source files with the same name
|
||
|
# but in different subdirectories
|
||
|
|
||
|
add_executable(sameName
|
||
|
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
|
||
|
item.cpp
|
||
|
data.qrc
|
||
|
main.cpp
|
||
|
)
|
||
|
target_link_libraries(sameName ${QT_LIBRARIES})
|
||
7 years ago
|
set_target_properties(sameName PROPERTIES
|
||
|
AUTOMOC TRUE
|
||
|
AUTOUIC TRUE
|
||
7 years ago
|
AUTORCC TRUE
|
||
|
)
|
||
8 years ago
|
|
||
|
# Set different compression levels
|
||
|
if (QT_TEST_VERSION STREQUAL 4)
|
||
|
set(rccCompress "-compress")
|
||
|
else()
|
||
|
set(rccCompress "--compress")
|
||
|
endif()
|
||
|
set_target_properties(sameName PROPERTIES AUTORCC_OPTIONS "${rccCompress};0" )
|
||
|
set_source_files_properties(aaa/data.qrc PROPERTIES AUTORCC_OPTIONS "${rccCompress};1" )
|
||
|
set_source_files_properties(bbb/data.qrc PROPERTIES AUTORCC_OPTIONS "${rccCompress};2" )
|
||
|
set_source_files_properties(ccc/data.qrc PROPERTIES AUTORCC_OPTIONS "${rccCompress};3" )
|