From a2f4dca16eafe1818f7f3055d16c4beb60ca8854 Mon Sep 17 00:00:00 2001 From: Edgar Date: Fri, 6 Aug 2021 17:55:39 +0000 Subject: [PATCH] :tada: Added OIS --- ois/all/conandata.yml | 4 ++++ ois/all/conanfile.py | 35 +++++++++++++++++++++++++++++++++++ ois/config.yml | 3 +++ 3 files changed, 42 insertions(+) create mode 100644 ois/all/conandata.yml create mode 100644 ois/all/conanfile.py create mode 100644 ois/config.yml diff --git a/ois/all/conandata.yml b/ois/all/conandata.yml new file mode 100644 index 0000000..0cc1bea --- /dev/null +++ b/ois/all/conandata.yml @@ -0,0 +1,4 @@ +sources: + "1.5.1": + url: "https://github.com/wgois/OIS/archive/refs/tags/v1.5.1.tar.gz" + sha256: "614f6ef6d69cf6d84f1b50efff46a6c1acce426933e5f0dcf29862ea8332af73" \ No newline at end of file diff --git a/ois/all/conanfile.py b/ois/all/conanfile.py new file mode 100644 index 0000000..2f525cf --- /dev/null +++ b/ois/all/conanfile.py @@ -0,0 +1,35 @@ +from conans import ConanFile, CMake, tools +from conans.tools import os_info, SystemPackageTool + + +class OisConan(ConanFile): + name = "ois" + license = "zlib" + author = "Edgar Edgar@AnotherFoxGuy.com" + url = "https://github.com/AnotherFoxGuy/conan-OIS/" + description = "Object oriented Input System" + topics = ("Input", "System") + settings = "os", "compiler", "build_type", "arch" + + def system_requirements(self): + if os_info.is_linux: + if os_info.with_apt: + installer = SystemPackageTool() + installer.install("libx11-dev") + + def source(self): + tools.get(**self.conan_data["sources"][self.version], strip_root=True) + + def build(self): + cmake = CMake(self) + cmake.definitions['OIS_BUILD_DEMOS'] = 'OFF' + cmake.configure() + cmake.build() + + def package(self): + cmake = CMake(self) + cmake.install() + + def package_info(self): + self.cpp_info.includedirs = ['include', 'include/ois'] + self.cpp_info.libs = tools.collect_libs(self) diff --git a/ois/config.yml b/ois/config.yml new file mode 100644 index 0000000..f1c5e3d --- /dev/null +++ b/ois/config.yml @@ -0,0 +1,3 @@ +versions: + "1.5.1": + folder: all