build: fix namespace build macro

This commit is contained in:
2026-05-03 14:47:55 +01:00
parent 7b42a023e4
commit a0283da135
4 changed files with 15 additions and 25 deletions
+11 -10
View File
@@ -71,16 +71,9 @@ function(add_fx_assembly)
install(FILES ${headers} DESTINATION include/${assembly_path})
endfunction(add_fx_assembly)
macro(export_fx_namespace_details)
set(options)
set(one_value_args NAME)
set(multi_value_args)
cmake_parse_arguments(PARSE_ARGV 0 arg
"${options}"
"${one_value_args}"
"${multi_value_args}")
macro(export_fx_namespace_details ns_name)
set(namespace_name ${ns_name})
set(namespace_name ${arg_NAME})
string(REPLACE "." "/" namespace_path ${namespace_name})
set(namespace_target_name ${namespace_name})
@@ -89,7 +82,15 @@ macro(export_fx_namespace_details)
file(GLOB namespace_sources
*.c *.h
${CMAKE_CURRENT_SOURCE_DIR}/include/${namespace_path}/*.h)
file(GLOB sys_sources sys/${fx_system_name}/*.c sys/${fx_system_name}/*.h)
foreach (dir ${source_dirs})
file(GLOB dir_sources ${dir}/*.c ${dir}/*.h)
set(namespace_sources ${namespace_sources} ${dir_sources})
endforeach (dir)
file(GLOB sys_sources
${CMAKE_CURRENT_SOURCE_DIR}/sys/${fx_system_name}/*.c
${CMAKE_CURRENT_SOURCE_DIR}/sys/${fx_system_name}/*.h)
file(GLOB headers include/${namespace_path}/*.h)
set(namespace_sources
${namespace_sources}