CMakeLists.txt 610 B

123456789101112131415161718192021222324
  1. set(CMAKE_INCLUDE_CURRENT_DIR ON)
  2. set(CMAKE_AUTOMOC ON)
  3. set(CMAKE_AUTORCC ON)
  4. find_package(Qt5 COMPONENTS Core CONFIG REQUIRED)
  5. file(GLOB HEADERS
  6. universallistmodelbase.h
  7. universallistmodel.h
  8. exmaples_common_global.h
  9. )
  10. file(GLOB SOURCES
  11. universallistmodelbase.cpp
  12. universallistmodel.cpp
  13. )
  14. # headers added to make them visible in IDE
  15. add_library(examples_common ${SOURCES} ${HEADERS})
  16. target_compile_definitions(examples_common PRIVATE EXAMPLES_COMMON_LIB)
  17. target_include_directories(examples_common PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
  18. target_link_libraries(examples_common Qt5::Core)