Repository navigation
Expand file tree
/
Copy pathconanfile.py
More file actions
45 lines (38 loc) · 1.42 KB
/
Copy pathconanfile.py
File metadata and controls
45 lines (38 loc) · 1.42 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
# ********************************************************************************
# Copyright (c) 2023 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This program and the accompanying materials are made available under the
# terms of the Apache License 2.0 which is available at
# http://www.apache.org/licenses/LICENSE-2.0
#
# SPDX-License-Identifier: Apache-2.0
# *******************************************************************************/
from conan import ConanFile
from conan.tools.cmake import CMake, cmake_layout
class KuksaCppClient(ConanFile):
name = "kuksa-cpp-client"
version = "0.1"
settings = "os", "compiler", "build_type", "arch"
generators = "CMakeToolchain", "CMakeDeps"
options = {"enable_unit_tests": [True, False]}
default_options = {"enable_unit_tests": False}
def layout(self):
cmake_layout(self)
# Dependencies
def requirements(self):
self.requires("grpc/1.50.0")
self.requires("spdlog/1.15.0")
# Test dependencies
def build_requirements(self):
self.test_requires("gtest/1.16.0")
# Building with CMake
def build(self):
cmake = CMake(self)
variables = {
"ENABLE_UNIT_TESTS": "ON" if self.options.enable_unit_tests else "OFF"
}
cmake.configure(variables=variables)
cmake.build()