-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconanfile.py
More file actions
58 lines (49 loc) · 1.63 KB
/
conanfile.py
File metadata and controls
58 lines (49 loc) · 1.63 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
52
53
54
55
56
57
58
from conan import ConanFile
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
from conan.tools.files import copy
import os
class AsunCppConan(ConanFile):
name = "asun-cpp"
version = "1.0.0"
package_type = "header-library"
license = "MIT"
author = "asun contributors"
url = "https://github.com/asunLab/asun/tree/main/asun-cpp"
description = "Header-only C++17 ASUN (Array-Schema Unified Notation) library"
topics = ("asun", "serialization", "schema", "header-only", "data-format")
settings = "os", "arch", "compiler", "build_type"
exports_sources = (
"CMakeLists.txt",
"cmake/*",
"include/*",
"README.md",
)
no_copy_source = True
def package_id(self):
self.info.clear()
def layout(self):
cmake_layout(self)
def generate(self):
toolchain = CMakeToolchain(self)
toolchain.variables["ASUN_BUILD_EXAMPLES"] = False
toolchain.variables["ASUN_BUILD_TESTS"] = False
toolchain.generate()
deps = CMakeDeps(self)
deps.generate()
def build(self):
cmake = CMake(self)
cmake.configure()
def package(self):
cmake = CMake(self)
cmake.install()
copy(
self,
"README.md",
self.source_folder,
os.path.join(self.package_folder, "share", "doc", "asun-cpp"),
)
def package_info(self):
self.cpp_info.set_property("cmake_file_name", "asun")
self.cpp_info.set_property("cmake_target_name", "asun::asun")
self.cpp_info.bindirs = []
self.cpp_info.libdirs = []