From f6a3ac015f8b7b7d3236168e3459409bc175d306 Mon Sep 17 00:00:00 2001 From: Edouard DUPIN Date: Tue, 4 Oct 2016 23:41:29 +0200 Subject: [PATCH] [DEV] Update new lutin 2.2.0 (no legacy support) --- lutin_glew.py | 91 +++++++++++++++++++++++++-------------------------- 1 file changed, 44 insertions(+), 47 deletions(-) diff --git a/lutin_glew.py b/lutin_glew.py index 61be7f1..5f46118 100644 --- a/lutin_glew.py +++ b/lutin_glew.py @@ -1,5 +1,5 @@ #!/usr/bin/python -import lutin.module as module +import lutin.debug as debug import lutin.tools as tools import os @@ -20,51 +20,48 @@ def get_maintainer(): def get_version(): return [2,0,0] -def create(target, module_name): - if "Windows" in target.get_type(): - #http://glew.sourceforge.net/index.html - my_module = module.Module(__file__, module_name, get_type()) - - my_module.add_header_file([ - 'glew/include/GL/glew.h', - 'glew/include/GL/glxew.h', - 'glew/include/GL/wglew.h', - 'glew/include/GL/eglew.h' - ], - destination_path="GL") - my_module.add_src_file([ - 'glew/src/glew.c', - #'glew/src/glewinfo.c', - #'glew/src/visualinfo.c' - ]) - """ - my_module.add_src_file([ - 'glew/auto/src/glewinfo_gl.c', - 'glew/auto/src/glew_init_tail.c', - 'glew/auto/src/glew_head.c', - 'glew/auto/src/glew_init_egl.c', - 'glew/auto/src/glew_init_gl.c', - 'glew/auto/src/glew_init_glx.c', - 'glew/auto/src/glew_str_glx.c', - 'glew/auto/src/glewinfo_wgl.c', - 'glew/auto/src/glewinfo_tail.c', - 'glew/auto/src/glew_str_wgl.c', - 'glew/auto/src/glew_str_egl.c', - 'glew/auto/src/glew_str_tail.c', - 'glew/auto/src/glewinfo_head.c', - 'glew/auto/src/glew_str_head.c', - 'glew/auto/src/glew_init_wgl.c', - 'glew/auto/src/glewinfo_egl.c', - 'glew/auto/src/glewinfo_glx.c', - ]) - """ - my_module.add_depend([ - "opengl", - "gdi" - ]) - my_module.add_path("glew/auto/src/") - return my_module - else: - return None +def configure(target, my_module): + if "Windows" not in target.get_type(): + return False + + my_module.add_header_file([ + 'glew/include/GL/glew.h', + 'glew/include/GL/glxew.h', + 'glew/include/GL/wglew.h', + 'glew/include/GL/eglew.h' + ], + destination_path="GL") + my_module.add_src_file([ + 'glew/src/glew.c', + #'glew/src/glewinfo.c', + #'glew/src/visualinfo.c' + ]) + """ + my_module.add_src_file([ + 'glew/auto/src/glewinfo_gl.c', + 'glew/auto/src/glew_init_tail.c', + 'glew/auto/src/glew_head.c', + 'glew/auto/src/glew_init_egl.c', + 'glew/auto/src/glew_init_gl.c', + 'glew/auto/src/glew_init_glx.c', + 'glew/auto/src/glew_str_glx.c', + 'glew/auto/src/glewinfo_wgl.c', + 'glew/auto/src/glewinfo_tail.c', + 'glew/auto/src/glew_str_wgl.c', + 'glew/auto/src/glew_str_egl.c', + 'glew/auto/src/glew_str_tail.c', + 'glew/auto/src/glewinfo_head.c', + 'glew/auto/src/glew_str_head.c', + 'glew/auto/src/glew_init_wgl.c', + 'glew/auto/src/glewinfo_egl.c', + 'glew/auto/src/glewinfo_glx.c', + ]) + """ + my_module.add_depend([ + "opengl", + "gdi" + ]) + my_module.add_path("glew/auto/src/") + return True