forked from Ultimaker/cura-build-environment
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconanfile.py
43 lines (32 loc) · 1.27 KB
/
conanfile.py
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
from pathlib import Path
from conan import ConanFile
from conan.tools.cmake import CMakeToolchain, CMakeDeps, CMake
from conans.errors import ConanInvalidConfiguration
from conans.tools import Version
from conan.tools.files import files
required_conan_version = ">=1.46.2"
class CuraBuildEnvironemtConan(ConanFile):
name = "cura-build-environment"
description = "Building Cura dependencies"
topics = ("conan", "python", "pypi", "pip")
settings = "os", "compiler", "build_type", "arch"
build_policy = "missing"
def configure(self):
self.options["boost"].header_only = True
def requirements(self):
self.requires("protobuf/3.17.1")
self.requires("clipper/6.4.2")
self.requires("boost/1.78.0")
self.requires("gtest/1.8.1")
self.requires("nlopt/2.7.0")
self.requires("rapidjson/1.1.0")
self.requires("stb/20200203")
def generate(self):
cmake = CMakeDeps(self)
cmake.generate()
tc = CMakeToolchain(self)
# Don't use Visual Studio as the CMAKE_GENERATOR
if self.settings.compiler == "Visual Studio":
tc.blocks["generic_system"].values["generator_platform"] = None
tc.blocks["generic_system"].values["toolset"] = None
tc.generate()