More CMake stuff

This commit is contained in:
2021-10-17 00:12:35 -07:00
parent f7165daa6d
commit b2e99bb976
8 changed files with 97 additions and 26 deletions

28
src/game/CMakeLists.txt Normal file
View File

@ -0,0 +1,28 @@
# Copyright (c) 2021 Dominic Msters
#
# This software is released under the MIT License.
# https://opensource.org/licenses/MIT
# Definitions
# Libraries
# Sources
file(GLOB GAME_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.c)
file(GLOB GAME_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/*.h)
file(GLOB_RECURSE SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/${TARGET_GAME}/*.c)
file(GLOB_RECURSE HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/${TARGET_GAME}*.h)
target_sources(${PROJECT_NAME}
PRIVATE
${GAME_SOURCES}
${SOURCES}
${GAME_HEADERS}
${HEADERS}
)
# Includes
target_include_directories(${PROJECT_NAME}
PUBLIC
${CMAKE_CURRENT_LIST_DIR}
)