diff --git a/modules/helpers.cmake b/modules/helpers.cmake index f89ff09..6bdd53b 100644 --- a/modules/helpers.cmake +++ b/modules/helpers.cmake @@ -15,15 +15,17 @@ endfunction() function(AddFGLExecutable NAME SRC_SOURCES_LOCATION) file(GLOB_RECURSE CPP_SOURCES ${SRC_SOURCES_LOCATION}/**.cpp) file(GLOB_RECURSE HPP_SOURCES ${SRC_SOURCES_LOCATION}/**.hpp) - add_executable(${NAME} ${CPP_SOURCES}) + add_executable(${NAME} ${CPP_SOURCES} ${HPP_SOURCES}) target_include_directories(${NAME} PRIVATE ${HPP_SOURCES}) SetFGLFlags(${NAME}) endfunction() -function(AddFGLLibrary NAME MODE SRC_SOURCES HEADER_SOURCES) - file(GLOB_RECURSE CPP_SOURCES ${SRC_SOURCES}/**.cpp) - file(GLOB_RECURSE HPP_SOURCES ${HEADER_SOURCES}/**.hpp) - add_library(${NAME} ${MODE} ${CPP_SOURCES} ${HPP_SOURCES}) - target_include_directories(${NAME} PUBLIC ${HEADER_SOURCES}) +function(AddFGLLibrary 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) + file(GLOB_RECURSE INCLUDE_HPP_SOURCES ${INCLUDE_SOURCES_LOCATION}/**.hpp) + 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() \ No newline at end of file