Moved a tonne of code around
This commit is contained in:
@ -3,9 +3,7 @@
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
# Definitions
|
||||
|
||||
# Libraries
|
||||
# Dawn Libraries
|
||||
target_link_libraries(${PROJECT_NAME}
|
||||
PUBLIC
|
||||
glad
|
||||
@ -14,26 +12,25 @@ target_link_libraries(${PROJECT_NAME}
|
||||
duktape
|
||||
)
|
||||
|
||||
# Sources
|
||||
file(GLOB_RECURSE SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.c)
|
||||
file(GLOB_RECURSE HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/*.h)
|
||||
|
||||
list(FILTER SOURCES EXCLUDE REGEX ".*game\\/.*")
|
||||
list(FILTER HEADERS EXCLUDE REGEX ".*game\\/.*")
|
||||
target_include_directories(${PROJECT_NAME}
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_LIST_DIR}
|
||||
)
|
||||
|
||||
# Dawn Sources
|
||||
file(GLOB_RECURSE SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/dawn/*.c(pp|xx))
|
||||
file(GLOB_RECURSE HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/dawn/*.h(pp|xx))
|
||||
target_sources(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
${SOURCES}
|
||||
${HEADERS}
|
||||
)
|
||||
|
||||
# Includes
|
||||
target_include_directories(${PROJECT_NAME}
|
||||
PUBLIC
|
||||
${CMAKE_CURRENT_LIST_DIR}
|
||||
)
|
||||
|
||||
# Sub
|
||||
if(TARGET_TYPE STREQUAL game)
|
||||
add_subdirectory(game)
|
||||
endif()
|
||||
# Sandbox Game Sources
|
||||
file(GLOB_RECURSE SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/sandbox/*.c(pp|xx))
|
||||
file(GLOB_RECURSE HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/sandbox/*.h(pp|xx))
|
||||
target_sources(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
${SOURCES}
|
||||
${HEADERS}
|
||||
)
|
Reference in New Issue
Block a user