-
Notifications
You must be signed in to change notification settings - Fork 4
/
CMakeLists.txt
32 lines (25 loc) · 1.17 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
cmake_minimum_required(VERSION 3.16)
include(.cmake.conf)
project(QtGrpc
VERSION "${QT_REPO_MODULE_VERSION}"
DESCRIPTION "Qt GRPC and Protobuf generator and bindings."
HOMEPAGE_URL "https://qt.io"
LANGUAGES CXX C
)
set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS TRUE)
find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS BuildInternals Core)
# Try to find Qt6::qtprotobufgen and Qt6::qtgrpcgen targets from host tools
# when cross-compiling.
if(NOT "${QT_HOST_PATH}" STREQUAL "")
add_subdirectory("${CMAKE_CURRENT_LIST_DIR}/src/tools/host")
endif()
find_package(Qt6 ${PROJECT_VERSION} CONFIG OPTIONAL_COMPONENTS Network Gui Widgets Quick
QmlNetwork QuickControls2 QuickTest)
qt_internal_project_setup()
include("${CMAKE_CURRENT_LIST_DIR}/src/tools/qtprotobufgen/Qt6ProtobufToolsMacros.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/src/tools/qtgrpcgen/Qt6GrpcToolsMacros.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/src/protobuf/Qt6ProtobufBuildInternals.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/src/wellknown/Qt6ProtobufWellKnownTypesBuildInternals.cmake")
qt_build_repo()