ProjectConfig.cmake.in 1.1 KB

123456789101112131415161718192021
  1. set(QT_VERSIONED_PREFIX @QT_VERSIONED_PREFIX@)
  2. set(QT_PROTOBUF_STATIC @QT_PROTOBUF_STATIC@)
  3. set(QT_PROTOBUF_NAMESPACE @QT_PROTOBUF_NAMESPACE@)
  4. list(PREPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
  5. foreach(component ${@PROJECT_NAME@_FIND_COMPONENTS})
  6. # For requested component, execute its "config" script
  7. if(component STREQUAL "ProtobufGenerator")
  8. if(NOT CMAKE_CROSSCOMPILING)
  9. set(component_config "${CMAKE_CURRENT_LIST_DIR}/${QT_PROTOBUF_NAMESPACE}qtprotobufgenConfig.cmake")
  10. else()
  11. set(component_config "${QT_PROTOBUF_HOST_PATH}/${QT_PROTOBUF_NAMESPACE}/${QT_PROTOBUF_NAMESPACE}qtprotobufgenConfig.cmake")
  12. endif()
  13. else()
  14. set(component_config "${CMAKE_CURRENT_LIST_DIR}/${QT_PROTOBUF_NAMESPACE}${component}Config.cmake")
  15. endif()
  16. get_filename_component(component_config "${component_config}" ABSOLUTE)
  17. if(NOT EXISTS "${component_config}")
  18. message(FATAL_ERROR "Component ${component} not found. ${component_config} doesn't exist.")
  19. endif()
  20. include("${component_config}")
  21. endforeach()