cmake/Tests/QtAutogen/SameName/CMakeLists.txt

49 lines
1.2 KiB
CMake
Raw Normal View History

2020-08-30 11:54:41 +02:00
cmake_minimum_required(VERSION 3.16.0)
2018-04-23 21:13:27 +02:00
project(SameName)
2019-11-11 23:01:05 +01:00
include("../AutogenGuiTest.cmake")
2018-04-23 21:13:27 +02:00
2020-08-30 11:54:41 +02:00
# Process .hh headers in AUTOMOC
cmake_policy(SET CMP0100 NEW)
2016-10-30 18:24:19 +01:00
# 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
2019-11-11 23:01:05 +01:00
object.h
2020-08-30 11:54:41 +02:00
object.hh
2019-11-11 23:01:05 +01:00
object.h++
object.hpp
object.hxx
2020-02-01 23:06:01 +01:00
object_upper_ext.H
2016-10-30 18:24:19 +01:00
data.qrc
main.cpp
)
target_link_libraries(sameName ${QT_LIBRARIES})
2018-01-26 17:06:56 +01:00
set_target_properties(sameName PROPERTIES
AUTOMOC TRUE
AUTOUIC TRUE
2018-04-23 21:13:27 +02:00
AUTORCC TRUE
)
2017-07-20 19:35:53 +02:00
# Set different compression levels
2018-10-28 12:09:07 +01:00
if (QT_TEST_VERSION EQUAL 4)
2017-07-20 19:35:53 +02:00
set(rccCompress "-compress")
else()
set(rccCompress "--compress")
endif()
2019-11-11 23:01:05 +01:00
set_target_properties(sameName PROPERTIES AUTORCC_OPTIONS "${rccCompress};1" )
set_source_files_properties(aaa/data.qrc PROPERTIES AUTORCC_OPTIONS "${rccCompress};2" )
set_source_files_properties(bbb/data.qrc PROPERTIES AUTORCC_OPTIONS "${rccCompress};3" )
set_source_files_properties(ccc/data.qrc PROPERTIES AUTORCC_OPTIONS "${rccCompress};4" )