build: fix namespace build macro
This commit is contained in:
+11
-10
@@ -71,16 +71,9 @@ function(add_fx_assembly)
|
|||||||
install(FILES ${headers} DESTINATION include/${assembly_path})
|
install(FILES ${headers} DESTINATION include/${assembly_path})
|
||||||
endfunction(add_fx_assembly)
|
endfunction(add_fx_assembly)
|
||||||
|
|
||||||
macro(export_fx_namespace_details)
|
macro(export_fx_namespace_details ns_name)
|
||||||
set(options)
|
set(namespace_name ${ns_name})
|
||||||
set(one_value_args NAME)
|
|
||||||
set(multi_value_args)
|
|
||||||
cmake_parse_arguments(PARSE_ARGV 0 arg
|
|
||||||
"${options}"
|
|
||||||
"${one_value_args}"
|
|
||||||
"${multi_value_args}")
|
|
||||||
|
|
||||||
set(namespace_name ${arg_NAME})
|
|
||||||
string(REPLACE "." "/" namespace_path ${namespace_name})
|
string(REPLACE "." "/" namespace_path ${namespace_name})
|
||||||
set(namespace_target_name ${namespace_name})
|
set(namespace_target_name ${namespace_name})
|
||||||
|
|
||||||
@@ -89,7 +82,15 @@ macro(export_fx_namespace_details)
|
|||||||
file(GLOB namespace_sources
|
file(GLOB namespace_sources
|
||||||
*.c *.h
|
*.c *.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/include/${namespace_path}/*.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)
|
file(GLOB headers include/${namespace_path}/*.h)
|
||||||
set(namespace_sources
|
set(namespace_sources
|
||||||
${namespace_sources}
|
${namespace_sources}
|
||||||
|
|||||||
@@ -1,2 +1 @@
|
|||||||
export_fx_namespace_details(
|
export_fx_namespace_details(fx.collections)
|
||||||
NAME fx.collections)
|
|
||||||
|
|||||||
@@ -1,6 +1 @@
|
|||||||
set(namespace_include_paths ${CMAKE_CURRENT_SOURCE_DIR}/include PARENT_SCOPE)
|
export_fx_namespace_details(fx.reflection)
|
||||||
|
|
||||||
file(GLOB namespace_sources
|
|
||||||
*.c *.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/include/fx/reflection/*.h)
|
|
||||||
set(namespace_sources ${namespace_sources} PARENT_SCOPE)
|
|
||||||
|
|||||||
+2
-7
@@ -1,7 +1,2 @@
|
|||||||
set(namespace_include_paths ${CMAKE_CURRENT_SOURCE_DIR}/include PARENT_SCOPE)
|
set(source_dirs hash)
|
||||||
|
export_fx_namespace_details(fx)
|
||||||
file(GLOB namespace_sources
|
|
||||||
*.c *.h
|
|
||||||
hash/*.c hash/*.h
|
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/include/fx/*.h)
|
|
||||||
set(namespace_sources ${namespace_sources} PARENT_SCOPE)
|
|
||||||
|
|||||||
Reference in New Issue
Block a user