diff options
author | Anton Matosov <amatosov@roblox.com> | 2019-02-11 21:46:53 +0300 |
---|---|---|
committer | Anton Matosov <amatosov@roblox.com> | 2019-02-11 21:46:53 +0300 |
commit | 01a5e4b9321e0cdda0eff4ce6a024f87f0ccf3c5 (patch) | |
tree | 8ae56ccc6b6def768891205415a7b33c2aac35cc /conanfile.py | |
parent | 5acd3778741e948a9271cf34777a3ef6aa46b7d7 (diff) |
Implement conan recipe
Diffstat (limited to 'conanfile.py')
-rw-r--r-- | conanfile.py | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/conanfile.py b/conanfile.py new file mode 100644 index 0000000..d1aabe3 --- /dev/null +++ b/conanfile.py @@ -0,0 +1,32 @@ +from conans import ConanFile, CMake, tools +from os import path + +class NanoPbConan(ConanFile): + name = "nanopb" + version = "0.3.9.2" + license = "zlib" + url = "https://jpa.kapsi.fi/nanopb/" + description = "Protocol Buffers with small code size" + settings = "os", "compiler", "build_type", "arch" + generators = "cmake" + exports = '*' + options = { + "fPIC": [True, False], + } + default_options = { + "fPIC": True, + } + + def configure(self): + if self.settings.os == "Windows" and self.settings.compiler == "Visual Studio": + del self.options.fPIC + + def build(self): + cmake = CMake(self) + cmake.configure(source_folder=path.join(self.source_folder, "conan-wrapper")) + cmake.build() + cmake.install() + + def package_info(self): + self.cpp_info.includedirs = ["include"] + self.cpp_info.libdirs = ["lib"] |