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})
|
24
src/display/CMakeLists.txt
Normal file
24
src/display/CMakeLists.txt
Normal file
@ -0,0 +1,24 @@
|
||||
# Copyright (c) 2021 Dominic Msters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
# Sources
|
||||
target_sources(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
bitmapfont.c
|
||||
camera.c
|
||||
font.c
|
||||
framebuffer.c
|
||||
matrix.c
|
||||
render.c
|
||||
renderlist.c
|
||||
shader.c
|
||||
spritebatch.c
|
||||
texture.c
|
||||
tileset.c
|
||||
)
|
||||
|
||||
# Subdirs
|
||||
add_subdirectory(animation)
|
||||
add_subdirectory(primitive)
|
13
src/display/animation/CMakeLists.txt
Normal file
13
src/display/animation/CMakeLists.txt
Normal file
@ -0,0 +1,13 @@
|
||||
# Copyright (c) 2021 Dominic Msters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
# Sources
|
||||
target_sources(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
animation.c
|
||||
easing.c
|
||||
queue.c
|
||||
timeline.c
|
||||
)
|
13
src/display/primitive/CMakeLists.txt
Normal file
13
src/display/primitive/CMakeLists.txt
Normal file
@ -0,0 +1,13 @@
|
||||
# Copyright (c) 2021 Dominic Msters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
# Sources
|
||||
target_sources(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
cube.c
|
||||
primitive.c
|
||||
quad.c
|
||||
skywall.c
|
||||
)
|
@ -86,11 +86,8 @@ renderpass_t * renderListRenderPass(
|
||||
*
|
||||
* @param list List to render.
|
||||
* @param shader Shader to use while rendering.
|
||||
* @param uniforms Uniforms for the render list. [ view, proj, model, ...text ]
|
||||
*/
|
||||
void renderListRender(
|
||||
renderlist_t *list, shader_t *shader, shaderuniform_t *uniforms
|
||||
);
|
||||
void renderListRender(renderlist_t *list, shader_t *shader);
|
||||
|
||||
/**
|
||||
* Takes a previously rendered render list and renders it to the backbuffer.
|
||||
|
12
src/engine/CMakeLists.txt
Normal file
12
src/engine/CMakeLists.txt
Normal file
@ -0,0 +1,12 @@
|
||||
# Copyright (c) 2021 Dominic Msters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
# Sources
|
||||
target_sources(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
client.c
|
||||
engine.c
|
||||
thread.c
|
||||
)
|
10
src/epoch/CMakeLists.txt
Normal file
10
src/epoch/CMakeLists.txt
Normal file
@ -0,0 +1,10 @@
|
||||
# Copyright (c) 2021 Dominic Msters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
# Sources
|
||||
target_sources(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
epoch.c
|
||||
)
|
16
src/file/CMakeLists.txt
Normal file
16
src/file/CMakeLists.txt
Normal file
@ -0,0 +1,16 @@
|
||||
# Copyright (c) 2021 Dominic Msters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
# Sources
|
||||
target_sources(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
asset.c
|
||||
assetmanager.c
|
||||
csv.c
|
||||
xml.c
|
||||
)
|
||||
|
||||
# Subdirs
|
||||
add_subdirectory(loaders)
|
14
src/file/loaders/CMakeLists.txt
Normal file
14
src/file/loaders/CMakeLists.txt
Normal file
@ -0,0 +1,14 @@
|
||||
# Copyright (c) 2021 Dominic Msters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
# Sources
|
||||
target_sources(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
font.c
|
||||
item.c
|
||||
scaledtexture.c
|
||||
shader.c
|
||||
texture.c
|
||||
)
|
10
src/input/CMakeLists.txt
Normal file
10
src/input/CMakeLists.txt
Normal file
@ -0,0 +1,10 @@
|
||||
# Copyright (c) 2021 Dominic Msters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
# Sources
|
||||
target_sources(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
input.c
|
||||
)
|
@ -36,6 +36,7 @@
|
||||
// Unix Fixes
|
||||
#include <unistd.h>
|
||||
#include <pthread.h>
|
||||
#include <errno.h>
|
||||
|
||||
typedef pthread_t threadhandle_t;
|
||||
#define sysThreadCreate(mthd,otp,usr) pthread_create(&otp,NULL,mthd,usr)
|
||||
|
10
src/locale/CMakeLists.txt
Normal file
10
src/locale/CMakeLists.txt
Normal file
@ -0,0 +1,10 @@
|
||||
# Copyright (c) 2021 Dominic Msters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
# Sources
|
||||
target_sources(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
language.c
|
||||
)
|
12
src/physics/CMakeLists.txt
Normal file
12
src/physics/CMakeLists.txt
Normal file
@ -0,0 +1,12 @@
|
||||
# Copyright (c) 2021 Dominic Msters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
# Sources
|
||||
target_sources(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
aabb.c
|
||||
sphere.c
|
||||
vector.c
|
||||
)
|
17
src/poker/CMakeLists.txt
Normal file
17
src/poker/CMakeLists.txt
Normal file
@ -0,0 +1,17 @@
|
||||
# Copyright (c) 2021 Dominic Msters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
# Sources
|
||||
target_sources(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
bet.c
|
||||
card.c
|
||||
dealer.c
|
||||
player.c
|
||||
poker.c
|
||||
pot.c
|
||||
turn.c
|
||||
winner.c
|
||||
)
|
10
src/save/CMakeLists.txt
Normal file
10
src/save/CMakeLists.txt
Normal file
@ -0,0 +1,10 @@
|
||||
# Copyright (c) 2021 Dominic Msters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
# Sources
|
||||
target_sources(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
save.c
|
||||
)
|
10
src/scene/CMakeLists.txt
Normal file
10
src/scene/CMakeLists.txt
Normal file
@ -0,0 +1,10 @@
|
||||
# Copyright (c) 2021 Dominic Msters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
# Sources
|
||||
target_sources(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
scene.c
|
||||
)
|
19
src/ui/CMakeLists.txt
Normal file
19
src/ui/CMakeLists.txt
Normal file
@ -0,0 +1,19 @@
|
||||
# Copyright (c) 2021 Dominic Msters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
# Sources
|
||||
target_sources(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
align.c
|
||||
breakpoint.c
|
||||
frame.c
|
||||
framedtextmenu.c
|
||||
grid.c
|
||||
image.c
|
||||
label.c
|
||||
menu.c
|
||||
rectangle.c
|
||||
textmenu.c
|
||||
)
|
15
src/util/CMakeLists.txt
Normal file
15
src/util/CMakeLists.txt
Normal file
@ -0,0 +1,15 @@
|
||||
# Copyright (c) 2021 Dominic Msters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
# Sources
|
||||
target_sources(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
array.c
|
||||
dictionary.c
|
||||
dynarray.c
|
||||
list.c
|
||||
mem.c
|
||||
string.c
|
||||
)
|
15
src/vn/CMakeLists.txt
Normal file
15
src/vn/CMakeLists.txt
Normal file
@ -0,0 +1,15 @@
|
||||
# Copyright (c) 2021 Dominic Msters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
# Sources
|
||||
target_sources(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
vncharacter.c
|
||||
vnscene.c
|
||||
)
|
||||
|
||||
# Subdirs
|
||||
add_subdirectory(conversation)
|
||||
add_subdirectory(ui)
|
11
src/vn/conversation/CMakeLists.txt
Normal file
11
src/vn/conversation/CMakeLists.txt
Normal file
@ -0,0 +1,11 @@
|
||||
# Copyright (c) 2021 Dominic Msters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
# Sources
|
||||
target_sources(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
talk.c
|
||||
vnconversation.c
|
||||
)
|
10
src/vn/ui/CMakeLists.txt
Normal file
10
src/vn/ui/CMakeLists.txt
Normal file
@ -0,0 +1,10 @@
|
||||
# Copyright (c) 2021 Dominic Msters
|
||||
#
|
||||
# This software is released under the MIT License.
|
||||
# https://opensource.org/licenses/MIT
|
||||
|
||||
# Sources
|
||||
target_sources(${PROJECT_NAME}
|
||||
PRIVATE
|
||||
vntextbox.c
|
||||
)
|
Reference in New Issue
Block a user