Add in module library helper function

This commit is contained in:
2025-06-11 14:44:23 -04:00
parent ecdcb16f2e
commit f435781f03

View File

@@ -45,6 +45,14 @@ function(AddFGLLibrary NAME MODE SRC_SOURCES_LOCATION INCLUDE_SOURCES_LOCATION)
SetFGLFlags(${NAME})
endfunction()
function(AddFGLModule NAME SRC_SOURCES_LOCATION)
file(GLOB_RECURSE CPP_SOURCES CONFIGURE_DEPENDS ${SRC_SOURCES_LOCATION}/**.cpp)
file(GLOB_RECURSE HPP_SOURCES CONFIGURE_DEPENDS ${SRC_SOURCES_LOCATION}/**.hpp)
add_library(${NAME} MODULE ${CPP_SOURCES} ${HPP_SOURCES})
target_include_directories(${NAME} PRIVATE ${SRC_SOURCES_LOCATION})
SetFGLFlags(${NAME})
endfunction()
function(AddFGLChildLibrary NAME MODE SRC_SOURCES_LOCATION INCLUDE_SOURCES_LOCATION)
file(GLOB_RECURSE CPP_SOURCES ${SRC_SOURCES_LOCATION}/**.cpp)
file(GLOB_RECURSE HPP_SOURCES ${SRC_SOURCES_LOCATION}/**.hpp)
@@ -52,5 +60,4 @@ function(AddFGLChildLibrary NAME MODE SRC_SOURCES_LOCATION INCLUDE_SOURCES_LOCAT
add_library(${NAME} ${MODE} ${CPP_SOURCES} ${HPP_SOURCES} ${INCLUDE_SOURCES_LOCATION})
target_include_directories(${NAME} PUBLIC ${INCLUDE_SOURCES_LOCATION})
target_include_directories(${NAME} PRIVATE ${SRC_SOURCES_LOCATION})
# SetFGLFlags(${NAME})
endfunction()