[DEV] update to future lutin 2.0

This commit is contained in:
Edouard DUPIN 2016-09-08 21:35:02 +02:00
parent 515cfaba1a
commit 74593169ff
4 changed files with 27 additions and 26 deletions

View File

@ -17,7 +17,7 @@ def create(target, module_name):
my_module.add_data_path([ my_module.add_data_path([
"data/dox", "data/dox",
]) ])
my_module.add_module_depend([ my_module.add_depend([
'elog', 'elog',
]) ])
my_module.add_module_define([ my_module.add_module_define([

View File

@ -30,6 +30,6 @@ def create(target, module_name):
my_module.add_src_file([ my_module.add_src_file([
'test/main.cpp' 'test/main.cpp'
]) ])
my_module.add_module_depend(['etk', 'gtest', 'test-debug']) my_module.add_depend(['etk', 'gtest', 'test-debug'])
return my_module return my_module

View File

@ -26,7 +26,7 @@ def get_version():
def create(target, module_name): def create(target, module_name):
my_module = module.Module(__file__, module_name, get_type()) my_module = module.Module(__file__, module_name, get_type())
my_module.add_extra_compile_flags() my_module.add_extra_flags()
# add the file to compile: # add the file to compile:
my_module.add_src_file([ my_module.add_src_file([
'etk/debug.cpp', 'etk/debug.cpp',
@ -64,43 +64,44 @@ def create(target, module_name):
'etk/archive/Archive.h', 'etk/archive/Archive.h',
'etk/archive/Zip.h']) 'etk/archive/Zip.h'])
if target.config["mode"] == "release": if "release" == target.get_mode():
# TODO : The other way is to remove this ... # TODO : The other way is to remove this ...
# TODO : Fore release mode : the etk folder are absolutly not at the same position in the tree ... # TODO : Fore release mode : the etk folder are absolutly not at the same position in the tree ...
my_module.compile_flags('c', "-DMODE_RELEASE") my_module.add_flag('c', "-DMODE_RELEASE")
else: else:
my_module.add_export_flag('c', "-DDEBUG=1") my_module.add_flag('c', "-DDEBUG=1", export=True)
# Bor backtrace display : # Bor backtrace display :
if target.name != "Windows" \ if "Windows" not in target.get_type() \
and target.name != "MacOs" \ and "MacOs" not in target.get_type() \
and target.name != "IOs": and "IOs" not in target.get_type():
# TODO : check if it is really needed ... # TODO : check if it is really needed ...
my_module.add_export_flag('link', [ my_module.add_flag('link', [
'-ldl', '-ldl',
'-rdynamic']) '-rdynamic'],
elif target.name != "Windows": export=True)
my_module.add_export_flag('link', [ elif "Windows" not in target.get_type():
'-ldl']) my_module.add_flag('link', [
'-ldl'],
export=True)
# build in C++ mode # build in C++ mode
my_module.compile_version("c++", 2011) my_module.compile_version("c++", 2011)
# add dependency of the generic C++ library: # add dependency of the generic C++ library:
my_module.add_module_depend('cxx') my_module.add_depend('cxx')
# add dependency of the generic math library: # add dependency of the generic math library:
my_module.add_module_depend('m') my_module.add_depend('m')
my_module.add_module_depend('elog') my_module.add_depend('elog')
my_module.add_module_depend('ememory') my_module.add_depend('ememory')
# add some optionnal libraries # add some optionnal libraries
my_module.add_optionnal_module_depend('minizip', ["c++", "-DETK_BUILD_MINIZIP"]) my_module.add_optionnal_depend('minizip', ["c++", "-DETK_BUILD_MINIZIP"])
my_module.add_optionnal_module_depend('linearmath', ["c", "-DETK_BUILD_LINEARMATH"], export=True) my_module.add_optionnal_depend('linearmath', ["c", "-DETK_BUILD_LINEARMATH"], export=True)
if target.name=="Windows": if "Windows" in target.get_type():
pass pass
elif target.name=="Android": elif "Android" in target.get_type():
my_module.add_module_depend("SDK") my_module.add_depend("SDK")
pass pass
else: else:
#TODO : Set it in a generic include system my_module.add_depend("pthread")
my_module.add_export_flag('link-lib', "pthread")
my_module.add_path(tools.get_current_path(__file__)) my_module.add_path(tools.get_current_path(__file__))
return my_module return my_module

View File

@ -33,7 +33,7 @@ def create(target, module_name):
my_module.add_header_file([ my_module.add_header_file([
'test-debug/debug.h' 'test-debug/debug.h'
]) ])
my_module.add_module_depend('etk') my_module.add_depend('etk')
my_module.add_path(tools.get_current_path(__file__)) my_module.add_path(tools.get_current_path(__file__))
return my_module return my_module