-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathconanfile.py
64 lines (57 loc) · 2.25 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
from conans import ConanFile, CMake, tools
from distutils.dir_util import copy_tree
import os
class EffekseerConan(ConanFile):
name = "effekseer"
version = "161e"
description = "Conan package for Effekseer runtime."
url = "https://github.com/effekseer/Effekseer"
license = "MIT"
settings = "arch", "os", "compiler", "build_type"
generators = "cmake"
options = {
"shared": [True, False]
}
default_options = {
"shared": False
}
def source(self):
git = tools.Git(folder="source_subfolder")
git.clone("https://github.com/effekseer/Effekseer", self.version)
def build(self):
cmake = CMake(self)
options = {
"BUILD_SHARED_LIBS": self.options.shared,
"BUILD_VIEWER": False,
"BUILD_TEST": False,
"BUILD_EXAMPLES": False,
"BUILD_DX9": False,
"BUILD_DX11": False,
"BUILD_DX12": False,
"BUILD_VULKAN": False,
"BUILD_METAL" : False,
"BUILD_GL": False,
"USE_OPENGLES2": False,
"USE_OPENGLES3": False,
"USE_OPENGL3": False,
"USE_OPENAL": False,
"USE_XAUDIO2": False,
"USE_DSOUND": False,
"USE_OSM": False,
"USE_INTERNAL_LOADER": False,
}
if self.settings.os == "Windows":
options['USE_MSVC_RUNTIME_LIBRARY_DLL'] = "MD" in self.settings.compiler.runtime
cmake.configure(source_folder="source_subfolder", build_folder="build_subfolder", defs=options)
cmake.build()
cmake.install()
def package(self):
self.copy("*.h" , dst="include", src="include/", keep_path=False)
self.copy("*.hpp", dst="include", src="include/", keep_path=False)
self.copy("*.inl", dst="include", src="include/", keep_path=False)
self.copy("*.a", dst="lib", src="lib", keep_path=False)
self.copy("*.lib", dst="lib", src="lib", keep_path=False)
def package_info(self):
self.cpp_info.libs = ["Effekseer"]
self.cpp_info.includedirs = ["include/Effekseer"]
self.cpp_info.builddirs = ["lib"]