-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconanfile.py
48 lines (36 loc) · 1.08 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
44
45
46
47
48
import os
from conan import ConanFile
from conan.tools.cmake import CMakeToolchain, CMakeDeps, CMake, cmake_layout
class PluduxConan(ConanFile):
name = "pludux"
version = "0.1"
settings = "os", "compiler", "build_type", "arch"
options = {
"shared": [True, False],
"fPIC": [True, False]
}
default_options = {"shared": False, "fPIC": True}
requires = [
"gtest/1.15.0"
]
def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
def layout(self):
cmake_layout(self)
self.folders.generators = os.path.join("conan", "generators")
def generate(self):
cmake_deps = CMakeDeps(self)
cmake_deps.generate()
cmake_tc = CMakeToolchain(self)
cmake_tc.user_presets_path = False
cmake_tc.generate()
def build(self):
cmake = CMake(self)
if self.should_configure:
cmake.configure()
if self.should_build:
cmake.build()
def package(self):
cmake = CMake(self)
cmake.install()