-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconanfile.py
More file actions
51 lines (41 loc) · 1.6 KB
/
Copy pathconanfile.py
File metadata and controls
51 lines (41 loc) · 1.6 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
46
47
48
49
50
51
from conan import ConanFile
from conan.tools.build import check_min_cppstd
from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout, CMakeDeps
required_conan_version = ">=2.0"
class rusty_cppRecipe(ConanFile):
name = "rusty-cpp"
version = "0.1.13"
description = "Write C++ like Rust!"
# dual licensed under the Apache License v2.0 and the MIT License
license = "Apache-2.0", "MIT"
author = "Jiansheng Qiu jianshengqiu.cs@gmail.com"
url = "https://github.com/seekstar/rusty-cpp"
topics = ("C++", "Rust")
settings = "compiler", "build_type"
# Sources are located in the same place as this recipe, copy them to the recipe
exports_sources = "CMakeLists.txt", "include/*"
# We can avoid copying the sources to the build folder in the cache
no_copy_source = True
def package_id(self):
# Header-only libraries are the same for every platform.
# This ensures only one package is needed everywhere.
self.info.clear()
def layout(self):
cmake_layout(self)
def validate(self):
check_min_cppstd(self, 17)
def generate(self):
deps = CMakeDeps(self)
deps.generate()
tc = CMakeToolchain(self)
tc.generate()
def package(self):
cmake = CMake(self)
cmake.configure()
cmake.install()
def package_info(self):
# For header-only packages, libdirs and bindirs are not used
# so it's necessary to set those as empty.
self.cpp_info.set_property("cmake_target_name", "rusty-cpp")
self.cpp_info.libdirs = []
self.cpp_info.bindirs = []