-
Notifications
You must be signed in to change notification settings - Fork 0
/
conanfile.py
51 lines (39 loc) · 1.94 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
from conans import ConanFile, tools
from conanos.build import config_scheme
import os, shutil
class OpenglConan(ConanFile):
name = "OpenGL"
version = "master"
description = "The industry's most widely used and supported 2D and 3D graphics application programming interface (API)"
url = "https://github.com/conanos/OpenGL"
homepage = "https://www.opengl.org/"
settings = "os", "compiler", "build_type", "arch"
options = {"shared": [True, False], "fPIC": [True, False]}
default_options = { 'shared': True, 'fPIC': True }
_source_subfolder = "source_subfolder"
_build_subfolder = "build_subfolder"
def config_options(self):
if self.settings.os == "Windows":
del self.options.fPIC
def configure(self):
del self.settings.compiler.libcxx
config_scheme(self)
def source(self):
tools.mkdir(self._source_subfolder)
branch_ = "master"
with tools.chdir(self._source_subfolder):
opengl_url_ = "https://github.com/CentricularK/OpenGL-Registry.git"
git = tools.Git(folder="OpenGL-Registry")
git.clone(opengl_url_, branch=branch_)
#os.rename("OpenGL-Registry", self._source_subfolder)
egl_url_ = "https://github.com/KhronosGroup/EGL-Registry.git"
egl_git = tools.Git(folder="EGL-Registry")
egl_git.clone(egl_url_, branch=branch_)
#os.rename("EGL-Registry", self._source_subfolder)
def build(self):
pass
def package(self):
self.copy("*", dst=os.path.join(self.package_folder,"include","GL"), src=os.path.join(self.build_folder,self._source_subfolder,"OpenGL-Registry", "api","GL"))
self.copy("*", dst=os.path.join(self.package_folder,"include","KHR"), src=os.path.join(self.build_folder,self._source_subfolder,"EGL-Registry", "api","KHR"))
def package_info(self):
self.cpp_info.libs = tools.collect_libs(self)