summaryrefslogtreecommitdiffstats
path: root/Tests/QtAutogen/SameName/CMakeLists.txt
blob: 8d4f71f65e3de4bed76426f1bdfd5ce7ac94cd8e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
cmake_minimum_required(VERSION 3.10)
project(SameName)
include("../AutogenGuiTest.cmake")

# 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
  object.h
  object.h++
  object.hpp
  object.hxx
  data.qrc
  main.cpp
)
target_link_libraries(sameName ${QT_LIBRARIES})
set_target_properties(sameName PROPERTIES
  AUTOMOC TRUE
  AUTOUIC TRUE
  AUTORCC TRUE
)

# Set different compression levels
if (QT_TEST_VERSION EQUAL 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" )