-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathconanfile.py
More file actions
51 lines (43 loc) · 1.8 KB
/
Copy pathconanfile.py
File metadata and controls
51 lines (43 loc) · 1.8 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.cmake import CMake, cmake_layout
from conan.tools.files import copy
import os
class PlcopenConan(ConanFile):
name = "plcopen"
version = "0.21.0"
license = "Apache-2.0"
url = "https://github.com/lusipad/plcopen"
description = "PLCopen motion-control kernel — C++17 header-only library"
topics = ("motion-control", "plcopen", "robotics", "real-time")
package_type = "header-library"
settings = "os", "compiler", "build_type", "arch"
generators = "CMakeToolchain", "CMakeDeps"
no_copy_source = True
def layout(self):
cmake_layout(self)
def package_id(self):
self.info.clear()
def export_sources(self):
copy(self, "CMakeLists.txt", src=self.recipe_folder, dst=self.export_sources_folder)
copy(self, "core/*", src=self.recipe_folder, dst=self.export_sources_folder)
copy(self, "cmake/*", src=self.recipe_folder, dst=self.export_sources_folder)
copy(self, "LICENSE", src=self.recipe_folder, dst=self.export_sources_folder)
def build(self):
cmake = CMake(self)
cmake.configure(variables={
"PLCOPEN_BUILD_TESTS": "OFF",
"PLCOPEN_BUILD_DEMOS": "OFF",
"PLCOPEN_BUILD_PYTHON_BINDINGS": "OFF",
"PLCOPEN_BUILD_DOCS": "OFF",
})
cmake.build()
def package(self):
cmake = CMake(self)
cmake.install()
copy(self, "LICENSE", src=self.source_folder, dst=os.path.join(self.package_folder, "licenses"))
def package_info(self):
self.cpp_info.includedirs = ["include/plcopen"]
self.cpp_info.set_property("cmake_file_name", "plcopen")
self.cpp_info.set_property("cmake_target_name", "plcopen::plcopen")
self.cpp_info.bindirs = []
self.cpp_info.libdirs = []