ENH: Hook in GetPrerequisites to override item type
The hook is called gp_resolved_file_type_override. Signed-off-by: Michael Wild <themiwi@users.sourceforge.net>
This commit is contained in:
parent
b41647ca8f
commit
beda5eab39
|
@ -16,6 +16,7 @@
|
||||||
# gp_resolve_item
|
# gp_resolve_item
|
||||||
# (projects can override with gp_resolve_item_override)
|
# (projects can override with gp_resolve_item_override)
|
||||||
# gp_resolved_file_type
|
# gp_resolved_file_type
|
||||||
|
# (projects can override with gp_resolved_file_type_override)
|
||||||
# gp_file_type
|
# gp_file_type
|
||||||
# get_prerequisites
|
# get_prerequisites
|
||||||
# list_prerequisites
|
# list_prerequisites
|
||||||
|
@ -345,6 +346,9 @@ endfunction(gp_resolve_item)
|
||||||
# embedded
|
# embedded
|
||||||
# other
|
# other
|
||||||
#
|
#
|
||||||
|
# Override on a per-project basis by providing a project-specific
|
||||||
|
# gp_resolved_file_type_override function.
|
||||||
|
#
|
||||||
function(gp_resolved_file_type original_file file exepath dirs type_var)
|
function(gp_resolved_file_type original_file file exepath dirs type_var)
|
||||||
#message(STATUS "**")
|
#message(STATUS "**")
|
||||||
|
|
||||||
|
@ -428,6 +432,13 @@ function(gp_resolved_file_type original_file file exepath dirs type_var)
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Provide a hook so that projects can override the decision on whether a
|
||||||
|
# library belongs to the system or not by whatever logic they choose:
|
||||||
|
#
|
||||||
|
if(COMMAND gp_resolved_file_type_override)
|
||||||
|
gp_resolved_file_type_override("${resolved_file}" type)
|
||||||
|
endif()
|
||||||
|
|
||||||
set(${type_var} "${type}" PARENT_SCOPE)
|
set(${type_var} "${type}" PARENT_SCOPE)
|
||||||
|
|
||||||
#message(STATUS "**")
|
#message(STATUS "**")
|
||||||
|
|
Loading…
Reference in New Issue