diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2026-03-05 16:51:37 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2026-03-05 16:51:37 +0100 |
| commit | a61dbbdb02d1e50fb49147cc689f11dce2e62534 (patch) | |
| tree | 6b884dffa097e3ad5a7042aa9c765a5f38eb854c | |
| parent | ebae9ca877eabf5cbb6c84bf7bd7299b2d15a954 (diff) | |
[FEAT] Add Conan support.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
| -rw-r--r-- | .gitignore | 1 | ||||
| -rw-r--r-- | CMakeLists.txt | 5 | ||||
| -rw-r--r-- | conanfile.py | 48 |
3 files changed, 50 insertions, 4 deletions
@@ -10,6 +10,7 @@ __pycache__/ +CMakeUserPresets.json build/ doc/html/ diff --git a/CMakeLists.txt b/CMakeLists.txt index 00a1592..58414bf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,4 @@ set(CMAKE_CXX_STANDARD 20) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_CXX_EXTENSIONS OFF) - -if (INSTALL_OCL) - include(install_ocl.cmake) -endif() +include(install_ocl.cmake) 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"] + + + |
