Build: Modernize include directory management using target_sources(FILE_SET)

This commit is contained in:
Shauren
2025-11-12 22:53:54 +01:00
parent 7ccc2d4f6b
commit 3331699906
29 changed files with 624 additions and 639 deletions

View File

@@ -8,14 +8,13 @@
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
CollectSourceFiles(
${CMAKE_CURRENT_SOURCE_DIR}
TEST_SOURCES
)
GroupSources(${CMAKE_CURRENT_SOURCE_DIR})
add_executable(tests ${TEST_SOURCES})
add_executable(tests)
CollectAndAddSourceFiles(
tests
${CMAKE_CURRENT_SOURCE_DIR})
target_link_libraries(tests
PRIVATE
@@ -23,13 +22,7 @@ target_link_libraries(tests
game
Catch2::Catch2)
CollectIncludeDirectories(
${CMAKE_CURRENT_SOURCE_DIR}
TEST_INCLUDES)
target_include_directories(tests
PUBLIC
${TEST_INCLUDES}
PRIVATE
${CMAKE_CURRENT_BINARY_DIR})