forked from decimad/luabind-deboostified
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconanfile.py
43 lines (33 loc) · 1.22 KB
/
conanfile.py
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
from conan import ConanFile
from conan.tools.cmake import CMake, CMakeDeps, CMakeToolchain, cmake_layout
class LuabindDeboostifiedConan(ConanFile):
name = "luabind-deboostified"
version = "1.0"
license = "ZLIB"
author = "Marius Elvert marius.elvert@googlemail.com"
url = "/~https://github.com/ltjax/luabind-deboostified"
description = "Create Lua bindings for your C++ code easily"
topics = ("lua", "bindings")
settings = "os", "compiler", "build_type", "arch"
options = {"shared": [True, False]}
default_options = {"shared": False}
exports_sources = "luabind/*", "src/*", "doc/*", "CMakeLists.txt",
def requirements(self):
self.requires("lua/5.1", transitive_headers=True)
def generate(self):
deps = CMakeDeps(self)
deps.generate()
toolchain = CMakeToolchain(self)
toolchain.variables['LUABIND_BUILD_SHARED'] = self.options.shared
toolchain.generate()
def build(self):
cmake = CMake(self)
cmake.configure()
cmake.build()
def layout(self):
cmake_layout(self)
def package(self):
cmake = CMake(self)
cmake.install()
def package_info(self):
self.cpp_info.libs = ["luabind"]