meta: rename to fx

This commit is contained in:
2026-03-16 10:35:43 +00:00
parent 84df46489a
commit e9d0e323f0
233 changed files with 12875 additions and 12869 deletions

View File

@@ -1,4 +1,4 @@
function(add_bluelib_module)
function(add_fx_module)
set(options)
set(one_value_args NAME)
set(multi_value_args
@@ -22,86 +22,86 @@ function(add_bluelib_module)
set(sources ${sources} ${dir_sources})
endforeach (dir)
file(GLOB sys_sources sys/${b_system_name}/*.c sys/${b_system_name}/*.h)
set(root_header include/blue/${module_name}.h)
file(GLOB headers include/blue/${module_name}/*.h)
file(GLOB sys_sources sys/${fx_system_name}/*.c sys/${fx_system_name}/*.h)
set(root_header include/fx/${module_name}.h)
file(GLOB headers include/fx/${module_name}/*.h)
string(REPLACE "-" "_" module_preproc_token ${module_name})
string(TOUPPER ${module_preproc_token} module_preproc_token)
set(module_preproc_token BLUELIB_${module_preproc_token})
set(module_preproc_token FX_${module_preproc_token})
message(STATUS "Building module ${module_name} (shared)")
add_library(blue-${module_name} SHARED
add_library(fx-${module_name} SHARED
${sources}
${sys_sources}
${root_header}
${headers}
${arg_EXTRA_SOURCES})
message(STATUS "Building module ${module_name} (static)")
add_library(blue-${module_name}-s STATIC
add_library(fx-${module_name}-s STATIC
${sources}
${sys_sources}
${root_header}
${headers}
${arg_EXTRA_SOURCES})
target_include_directories(blue-${module_name} PUBLIC include/)
target_include_directories(blue-${module_name}-s PUBLIC include/)
target_include_directories(fx-${module_name} PUBLIC include/)
target_include_directories(fx-${module_name}-s PUBLIC include/)
target_compile_definitions(blue-${module_name} PUBLIC
target_compile_definitions(fx-${module_name} PUBLIC
${module_preproc_token}
BLUELIB_EXPORT=1)
target_compile_definitions(blue-${module_name}-s PUBLIC
FX_EXPORT=1)
target_compile_definitions(fx-${module_name}-s PUBLIC
${module_preproc_token}
BLUELIB_EXPORT=1
BLUELIB_STATIC=1)
FX_EXPORT=1
FX_STATIC=1)
set_target_properties(blue-${module_name}
set_target_properties(fx-${module_name}
PROPERTIES POSITION_INDEPENDENT_CODE ON)
foreach (dep ${arg_DEPENDENCIES})
target_link_libraries(blue-${module_name} blue-${dep})
target_link_libraries(blue-${module_name}-s blue-${dep}-s)
target_link_libraries(fx-${module_name} fx-${dep})
target_link_libraries(fx-${module_name}-s fx-${dep}-s)
endforeach (dep)
foreach (lib ${arg_LIBS})
target_link_libraries(blue-${module_name} ${lib})
target_link_libraries(blue-${module_name}-s ${lib})
target_link_libraries(fx-${module_name} ${lib})
target_link_libraries(fx-${module_name}-s ${lib})
endforeach (lib)
foreach (dir ${arg_INCLUDE_DIRS})
target_include_directories(blue-${module_name} PRIVATE
target_include_directories(fx-${module_name} PRIVATE
${dir})
target_include_directories(blue-${module_name}-s PRIVATE
target_include_directories(fx-${module_name}-s PRIVATE
${dir})
endforeach (dir)
foreach (def ${arg_DEFINES})
target_compile_definitions(blue-${module_name} PRIVATE
target_compile_definitions(fx-${module_name} PRIVATE
${def})
target_compile_definitions(blue-${module_name}-s PRIVATE
target_compile_definitions(fx-${module_name}-s PRIVATE
${def})
endforeach (def)
set_target_properties(blue-${module_name} PROPERTIES
set_target_properties(fx-${module_name} PROPERTIES
FOLDER "Shared/${module_name}")
set_target_properties(blue-${module_name}-s PROPERTIES
set_target_properties(fx-${module_name}-s PROPERTIES
FOLDER "Static/${module_name}")
TEST_BIG_ENDIAN(IS_BIG_ENDIAN)
if(IS_BIG_ENDIAN)
target_compile_definitions(blue-${module_name} PRIVATE
target_compile_definitions(fx-${module_name} PRIVATE
BIG_ENDIAN)
target_compile_definitions(blue-${module_name}-s PRIVATE
target_compile_definitions(fx-${module_name}-s PRIVATE
BIG_ENDIAN)
else()
target_compile_definitions(blue-${module_name} PRIVATE
target_compile_definitions(fx-${module_name} PRIVATE
LITTLE_ENDIAN)
target_compile_definitions(blue-${module_name}-s PRIVATE
target_compile_definitions(fx-${module_name}-s PRIVATE
LITTLE_ENDIAN)
endif()
install(TARGETS blue-${module_name} blue-${module_name}-s)
install(FILES ${root_header} DESTINATION include/blue)
install(FILES ${headers} DESTINATION include/blue/${module_name})
endfunction(add_bluelib_module)
install(TARGETS fx-${module_name} fx-${module_name}-s)
install(FILES ${root_header} DESTINATION include/fx)
install(FILES ${headers} DESTINATION include/fx/${module_name})
endfunction(add_fx_module)