blob: 3c06a1f564cd782607197d1cd836e7deb467d1fb [file] [log] [blame]
Alexey Polyudove7b69882020-06-04 16:00:11 -07001# Copyright 2020 Google LLC
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# https://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15cmake_minimum_required(VERSION 3.0.2)
16
17project(securemessage)
18
19option(securemessage_USE_LOCAL_PROTOBUF
20 "Use local copy of protobuf library and compiler" OFF)
21
suetfei4142f472022-02-11 00:17:45 -080022# Do not install gtest since we are embedding googletest.
23option(INSTALL_GTEST "Do not install gtest since we are embedding googletest" OFF)
24option(BYPASS_TESTING "Do not build or run tests" OFF)
25
Alexey Polyudove7b69882020-06-04 16:00:11 -070026include(cmake/proto_defs.cmake)
27include(cmake/local_build_setup.cmake)
28
29if (securemessage_USE_LOCAL_PROTOBUF)
30 include(cmake/local_build_protobuf.cmake)
31endif()
32
33find_package(Protobuf REQUIRED)
34find_package(OpenSSL REQUIRED)
35
36enable_testing()
37
38add_subdirectory(cpp)
39add_subdirectory(proto)
suetfei4142f472022-02-11 00:17:45 -080040
41if (NOT BYPASS_TESTING)
42 if (NOT TARGET gtest)
43 add_subdirectory(third_party/gtest)
44 endif()
Alexey Polyudove7b69882020-06-04 16:00:11 -070045endif()
suetfei4142f472022-02-11 00:17:45 -080046