CMake Nightly Date Stamp
[kiteware-cmake.git] / Tests / QtAutogen / SameName / CMakeLists.txt
blob4ce8dbd19391a82e8a62f3d5c399dd9f5871367e
1 cmake_minimum_required(VERSION 3.16.0)
2 project(SameName)
3 include("../AutogenGuiTest.cmake")
5 # Process .hh headers in AUTOMOC
6 cmake_policy(SET CMP0100 NEW)
8 # Test AUTOMOC and AUTORCC on source files with the same name
9 # but in different subdirectories
11 add_executable(sameName
12   aaa/bbb/item.cpp
13   aaa/bbb/data.qrc
14   aaa/item.cpp
15   aaa/data.qrc
16   bbb/aaa/item.cpp
17   bbb/aaa/data.qrc
18   bbb/item.cpp
19   bbb/data.qrc
20   ccc/item.cpp
21   ccc/data.qrc
22   item.cpp
23   object.h
24   object.hh
25   object.h++
26   object.hpp
27   object.hxx
28   object_upper_ext.H
29   data.qrc
30   main.cpp
32 target_link_libraries(sameName ${QT_LIBRARIES})
33 set_target_properties(sameName PROPERTIES
34   AUTOMOC TRUE
35   AUTOUIC TRUE
36   AUTORCC TRUE
39 # Set different compression levels
40 if (QT_TEST_VERSION EQUAL 4)
41   set(rccCompress "-compress")
42 else()
43   set(rccCompress "--compress")
44 endif()
45 set_target_properties(sameName PROPERTIES AUTORCC_OPTIONS "${rccCompress};1" )
46 set_source_files_properties(aaa/data.qrc PROPERTIES AUTORCC_OPTIONS "${rccCompress};2" )
47 set_source_files_properties(bbb/data.qrc PROPERTIES AUTORCC_OPTIONS "${rccCompress};3" )
48 set_source_files_properties(ccc/data.qrc PROPERTIES AUTORCC_OPTIONS "${rccCompress};4" )