summaryrefslogtreecommitdiffhomepage
path: root/conanfile.py
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2026-03-05 16:51:37 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2026-03-05 16:51:37 +0100
commita61dbbdb02d1e50fb49147cc689f11dce2e62534 (patch)
tree6b884dffa097e3ad5a7042aa9c765a5f38eb854c /conanfile.py
parentebae9ca877eabf5cbb6c84bf7bd7299b2d15a954 (diff)
[FEAT] Add Conan support.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'conanfile.py')
-rw-r--r--conanfile.py48
1 files changed, 48 insertions, 0 deletions
diff --git a/conanfile.py b/conanfile.py
new file mode 100644
index 0000000..5b9cd89
--- /dev/null
+++ b/conanfile.py
@@ -0,0 +1,48 @@
+from conan import ConanFile
+from conan.tools.cmake import CMakeToolchain, CMake, cmake_layout, CMakeDeps
+
+class oclRecipe(ConanFile):
+ name = "Open C++ Libraries."
+ version = "1.62.0"
+
+ # Optional metadata
+ license = "BSL-1.0"
+ author = "Amlal El Mahrouss amlal@nekernel.org"
+ url = "https://git.ocl.nekernel.org/src"
+ description = "The Open C++ Libraries super-project."
+ topics = ("c++17", "libraries", "cpp")
+
+ # Binary configuration
+ settings = "os", "compiler", "build_type", "arch"
+ options = {"shared": [True, False], "fPIC": [True, False]}
+ default_options = {"shared": False, "fPIC": True}
+
+ exports_sources = "CMakeLists.txt", "libs/*", "include/*"
+
+ def config_options(self):
+ if self.settings.os == "Windows":
+ del self.options.fPIC
+
+ def layout(self):
+ cmake_layout(self)
+
+ def generate(self):
+ deps = CMakeDeps(self)
+ deps.generate()
+ tc = CMakeToolchain(self)
+ tc.generate()
+
+ def build(self):
+ cmake = CMake(self)
+ cmake.configure()
+ cmake.build()
+
+ def package(self):
+ cmake = CMake(self)
+ cmake.install()
+
+ def package_info(self):
+ self.cpp_info.libs = ["ocl"]
+
+
+