CMakeLists for each C file
This commit is contained in:
@ -6,30 +6,38 @@
|
||||
# Dawn Libraries
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
PUBLIC
|
||||
${LIBS_PLATFORM}
|
||||
glad
|
||||
cglm
|
||||
stb
|
||||
duktape
|
||||
)
|
||||
|
||||
target_include_directories(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
${LIBS_PLATFORM}
|
||||
)
|
||||
|
||||
# Source H files
|
||||
target_include_directories(${PROJECT_NAME}
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_LIST_DIR}
|
||||
)
|
||||
|
||||
# Dawn Sources
|
||||
file(GLOB_RECURSE SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.c(pp|xx))
|
||||
file(GLOB_RECURSE HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/*.h(pp|xx))
|
||||
|
||||
# Exclude Game Sources
|
||||
list(FILTER SOURCES EXCLUDE REGEX ".*games\\/.*")
|
||||
list(FILTER HEADERS EXCLUDE REGEX ".*games\\/.*")
|
||||
|
||||
target_sources(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
${SOURCES}
|
||||
${HEADERS}
|
||||
)
|
||||
# Add in each part of the engine.
|
||||
add_subdirectory(display)
|
||||
add_subdirectory(engine)
|
||||
add_subdirectory(epoch)
|
||||
add_subdirectory(file)
|
||||
add_subdirectory(input)
|
||||
add_subdirectory(locale)
|
||||
add_subdirectory(physics)
|
||||
add_subdirectory(poker)
|
||||
add_subdirectory(save)
|
||||
add_subdirectory(scene)
|
||||
add_subdirectory(ui)
|
||||
add_subdirectory(util)
|
||||
add_subdirectory(vn)
|
||||
|
||||
# Add Game Sources
|
||||
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/games/${TARGET_GAME})
|
Reference in New Issue
Block a user