sysroot: add a set of base system files
This commit is contained in:
@@ -9,6 +9,34 @@ function(sysroot_reset)
|
||||
COMMAND_ERROR_IS_FATAL ANY)
|
||||
endfunction(sysroot_reset)
|
||||
|
||||
function(sysroot_set_base)
|
||||
set(options)
|
||||
set(one_value_args PATH)
|
||||
set(multi_value_args)
|
||||
|
||||
cmake_parse_arguments(PARSE_ARGV 0 arg
|
||||
"${options}"
|
||||
"${one_value_args}"
|
||||
"${multi_value_args}")
|
||||
|
||||
set(sysroot_target_name _sysroot-base)
|
||||
|
||||
get_property(sysroot_targets GLOBAL PROPERTY sysroot_target_list)
|
||||
list(LENGTH sysroot_targets nr_sysroot_targets)
|
||||
if (${nr_sysroot_targets} GREATER 0)
|
||||
math(EXPR serialiser_index "${nr_sysroot_targets}-1")
|
||||
list(GET sysroot_targets ${serialiser_index} serialiser)
|
||||
endif ()
|
||||
|
||||
add_custom_target(${sysroot_target_name}
|
||||
COMMAND ${Python_EXECUTABLE} ${sysroot_tool}
|
||||
set-base ${sysroot_manifest} ${arg_PATH}
|
||||
COMMENT "Preparing sysroot base"
|
||||
DEPENDS ${serialiser})
|
||||
|
||||
set_property(GLOBAL PROPERTY sysroot_target_list ${sysroot_targets} ${sysroot_target_name})
|
||||
endfunction(sysroot_set_base)
|
||||
|
||||
function(sysroot_add_library)
|
||||
set(options)
|
||||
set(one_value_args NAME HEADER_DIR LIB_DIR)
|
||||
@@ -93,7 +121,6 @@ function(sysroot_add_object_library)
|
||||
endif ()
|
||||
|
||||
get_property(tmp TARGET ${target_name} PROPERTY SUFFIX)
|
||||
message(STATUS ${tmp})
|
||||
|
||||
set_property(GLOBAL PROPERTY sysroot_target_list ${sysroot_targets} ${sysroot_target_name})
|
||||
endfunction(sysroot_add_object_library)
|
||||
|
||||
Reference in New Issue
Block a user