Fixes wrong include path for AddFGLLibrary

This commit is contained in:
2024-07-24 13:48:19 -04:00
parent 7d5c183c24
commit 00bb654939

View File

@@ -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()