CMakeLists.txt 885 B

1234567891011121314151617
  1. cmake_minimum_required(VERSION 3.10)
  2. project(RccOffMocLibrary)
  3. include("../AutogenTest.cmake")
  4. # Add not_generated_file.qrc to the source list to get the file-level
  5. # dependency, but don't generate a c++ file from it. Disable the AUTORCC
  6. # feature for this target. This tests that qrc files in the sources don't
  7. # have an effect on generation if AUTORCC is off.
  8. add_library(empty STATIC empty.cpp not_generated_file.qrc)
  9. set_target_properties(empty PROPERTIES AUTORCC OFF)
  10. set_target_properties(empty PROPERTIES AUTOMOC TRUE)
  11. target_link_libraries(empty no_link_language)
  12. add_library(no_link_language STATIC empty.h)
  13. set_target_properties(no_link_language PROPERTIES AUTOMOC TRUE)
  14. # Pass Qt compiler features to targets that don't link against Qt
  15. target_compile_features(no_link_language PRIVATE ${QT_COMPILE_FEATURES})
  16. target_compile_features(empty PRIVATE ${QT_COMPILE_FEATURES})