-
Notifications
You must be signed in to change notification settings - Fork 37
/
ProjectConfig.cmake.in
21 lines (21 loc) · 1.06 KB
/
ProjectConfig.cmake.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
set(QT_VERSIONED_PREFIX @QT_VERSIONED_PREFIX@)
set(QT_PROTOBUF_STATIC @QT_PROTOBUF_STATIC@)
set(QT_PROTOBUF_NAMESPACE @QT_PROTOBUF_NAMESPACE@)
list(PREPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}")
foreach(component ${@PROJECT_NAME@_FIND_COMPONENTS})
# For requested component, execute its "config" script
if(component STREQUAL "ProtobufGenerator")
if(NOT CMAKE_CROSSCOMPILING)
set(component_config "${CMAKE_CURRENT_LIST_DIR}/${QT_PROTOBUF_NAMESPACE}qtprotobufgenConfig.cmake")
else()
set(component_config "${QT_PROTOBUF_HOST_PATH}/${QT_PROTOBUF_NAMESPACE}/${QT_PROTOBUF_NAMESPACE}qtprotobufgenConfig.cmake")
endif()
else()
set(component_config "${CMAKE_CURRENT_LIST_DIR}/${QT_PROTOBUF_NAMESPACE}${component}Config.cmake")
endif()
get_filename_component(component_config "${component_config}" ABSOLUTE)
if(NOT EXISTS "${component_config}")
message(FATAL_ERROR "Component ${component} not found. ${component_config} doesn't exist.")
endif()
include("${component_config}")
endforeach()