[DEV] update header only library

This commit is contained in:
Edouard DUPIN 2022-02-15 23:20:53 +01:00
parent c74c1b1805
commit 201eef96df
3 changed files with 9 additions and 10 deletions

View File

@ -4,6 +4,7 @@ encoding//lutin/__init__.py=utf-8
encoding//lutin/builder.py=utf-8
encoding//lutin/depend.py=utf-8
encoding//lutin/env.py=utf-8
encoding//lutin/heritage.py=utf-8
encoding//lutin/macro.py=utf-8
encoding//lutin/module.py=utf-8
encoding//lutin/moduleGLD.py=utf-8

View File

@ -51,6 +51,7 @@ class Module:
## - BINARY_DYNAMIC
## - BINARY_STAND_ALONE
## - LIBRARY
## - LIBRARY_HEADER_ONLY
## - LIBRARY_DYNAMIC
## - LIBRARY_STATIC
## - PACKAGE
@ -367,7 +368,7 @@ class Module:
##
def paths_to_build(self, target, copy_list):
for source, destination, group in self._paths:
debug.warning("Might copy path : " + source + "==> (" + str(group) + ") " + destination)
debug.info("Might copy path : " + source + "==> (" + str(group) + ") " + destination)
tmp_path = os.path.dirname(os.path.realpath(os.path.join(self._origin_path, source)))
tmp_rule = os.path.basename(source)
for root, dirnames, filenames in os.walk(tmp_path):
@ -633,13 +634,9 @@ class Module:
self._sub_heritage_list.add_heritage_list(inherit_list)
# do sub library action for automatic generating ...
local_type = self._type
if self._type == 'LIBRARY_DYNAMIC':
if self._type in ['LIBRARY_HEADER_ONLY', 'LIBRARY_DYNAMIC', 'LIBRARY_STATIC' ]:
local_type = 'LIBRARY'
if self._type == 'LIBRARY_STATIC':
local_type = 'LIBRARY'
if self._type == 'BINARY_DYNAMIC':
local_type = 'BINARY'
if self._type == 'BINARY_STAND_ALONE':
if self._type in [ 'BINARY_DYNAMIC', 'BINARY_STAND_ALONE']:
local_type = 'BINARY'
if local_type in target.action_on_state:
for lvl in range(0,100):
@ -657,6 +654,8 @@ class Module:
debug.print_element("Prebuild", self._name, "-", package_version_string)
elif self._type == 'LIBRARY':
debug.print_element("Library", self._name, "-", package_version_string)
elif self._type == 'LIBRARY_HEADER_ONLY':
debug.print_element("Library(header-only)", self._name, "-", package_version_string)
elif self._type == 'LIBRARY_DYNAMIC':
debug.print_element("Library(dynamic)", self._name, "-", package_version_string)
elif self._type == 'LIBRARY_STATIC':
@ -786,9 +785,7 @@ class Module:
# ----------------------------------------------------
if self._type == 'PREBUILD':
self._local_heritage.add_sources(self._src)
elif self._type == 'LIBRARY' \
or self._type == 'LIBRARY_DYNAMIC' \
or self._type == 'LIBRARY_STATIC':
elif self._type in ['LIBRARY', 'LIBRARY_DYNAMIC', 'LIBRARY_STATIC', 'LIBRARY_HEADER_ONLY']:
res_file_out = []
if self._type == 'LIBRARY' \
or self._type == 'LIBRARY_STATIC':

View File

@ -35,6 +35,7 @@ def get_module_type_availlable():
'BINARY_DYNAMIC',
'BINARY_STAND_ALONE',
'LIBRARY',
'LIBRARY_HEADER_ONLY',
'LIBRARY_DYNAMIC',
'LIBRARY_STATIC',
'PACKAGE',