diff --git a/modules/helpers.cmake b/modules/helpers.cmake index 545ebbf..beac328 100644 --- a/modules/helpers.cmake +++ b/modules/helpers.cmake @@ -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()