Rename cmake variables
This commit is contained in:
@@ -6,44 +6,51 @@ set(CMAKE_C_STANDARD 11)
|
|||||||
set(BUILD_EXAMPLES false)
|
set(BUILD_EXAMPLES false)
|
||||||
add_subdirectory(libs/raylib-4.5.0)
|
add_subdirectory(libs/raylib-4.5.0)
|
||||||
|
|
||||||
set(
|
set(librarySources
|
||||||
lib_sources
|
|
||||||
libs/cute_tiled.c
|
libs/cute_tiled.c
|
||||||
libs/flecs/flecs.c
|
libs/flecs/flecs.c
|
||||||
)
|
)
|
||||||
|
|
||||||
set(
|
set(libraryDirs
|
||||||
lib_dirs
|
|
||||||
libs/cute_tiled
|
libs/cute_tiled
|
||||||
libs/flecs
|
libs/flecs
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
add_library(Breeze STATIC
|
set(BreezeSources
|
||||||
breeze/core/logger.c
|
breeze/core/logger.c
|
||||||
breeze/core/logger.h
|
|
||||||
breeze/core/logger_module.h
|
|
||||||
breeze/core/module_system.c
|
breeze/core/module_system.c
|
||||||
breeze/core/module_system.h
|
|
||||||
|
breeze/utils/tokenizer.c
|
||||||
|
)
|
||||||
|
|
||||||
|
set(BreezeHeaders
|
||||||
|
breeze/core/logger.h
|
||||||
|
|
||||||
breeze/math/vec2i.h
|
breeze/math/vec2i.h
|
||||||
|
|
||||||
breeze/utils/tokenizer.c
|
|
||||||
breeze/utils/tokenizer.h
|
breeze/utils/tokenizer.h
|
||||||
|
|
||||||
breeze/defines.h
|
breeze/defines.h
|
||||||
breeze/game.h
|
breeze/game.h
|
||||||
|
|
||||||
breeze.h
|
breeze.h
|
||||||
|
)
|
||||||
|
|
||||||
${lib_sources}
|
set(BreezeInternalHeaders
|
||||||
|
breeze/core/logger_module.h
|
||||||
|
breeze/core/module_system.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set(BreezePublicHeaders
|
add_library(Breeze STATIC
|
||||||
breeze.h)
|
${BreezeSources}
|
||||||
|
${BreezeInternalHeaders}
|
||||||
|
${BreezeHeaders}
|
||||||
|
${librarySources}
|
||||||
|
)
|
||||||
|
|
||||||
set_target_properties(Breeze PROPERTIES
|
set_target_properties(Breeze PROPERTIES
|
||||||
PUBLIC_HEADER ${BreezePublicHeaders})
|
PUBLIC_HEADER "${BreezeHeaders}")
|
||||||
|
|
||||||
target_link_libraries(Breeze raylib)
|
target_link_libraries(Breeze raylib)
|
||||||
|
|
||||||
@@ -52,9 +59,9 @@ target_include_directories(Breeze
|
|||||||
PUBLIC
|
PUBLIC
|
||||||
$<INSTALL_INTERFACE:include>
|
$<INSTALL_INTERFACE:include>
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||||
${lib_dirs})
|
${libraryDirs})
|
||||||
|
|
||||||
file(COPY ${BreezePublicHeader} DESTINATION "include")
|
file(COPY ${BreezeHeaders} DESTINATION "include")
|
||||||
|
|
||||||
if (${BUILD_BREEZE_TESTS})
|
if (${BUILD_BREEZE_TESTS})
|
||||||
MESSAGE(STATUS "Building breeze tests is enabled")
|
MESSAGE(STATUS "Building breeze tests is enabled")
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ typedef struct BzAppDesc {
|
|||||||
int32_t width;
|
int32_t width;
|
||||||
int32_t height;
|
int32_t height;
|
||||||
const char *title;
|
const char *title;
|
||||||
|
int32_t fps;
|
||||||
|
|
||||||
BzAppInitFunc init;
|
BzAppInitFunc init;
|
||||||
BzAppUpdateFunc update;
|
BzAppUpdateFunc update;
|
||||||
@@ -24,8 +25,6 @@ typedef struct BzAppDesc {
|
|||||||
extern bool bzMain(BzAppDesc *appDesc, int argc, const char **argv);
|
extern bool bzMain(BzAppDesc *appDesc, int argc, const char **argv);
|
||||||
|
|
||||||
#ifdef BZ_GAME_ENTRYPOINT
|
#ifdef BZ_GAME_ENTRYPOINT
|
||||||
|
|
||||||
|
|
||||||
#include <raylib.h>
|
#include <raylib.h>
|
||||||
|
|
||||||
|
|
||||||
@@ -38,7 +37,8 @@ int main(int argc, const char **argv) {
|
|||||||
BzAppDesc appDesc = {
|
BzAppDesc appDesc = {
|
||||||
1280,
|
1280,
|
||||||
720,
|
720,
|
||||||
"Breeze Engine"
|
"Breeze Engine",
|
||||||
|
60
|
||||||
};
|
};
|
||||||
|
|
||||||
bool successful = bzMain(&appDesc, argc, argv);
|
bool successful = bzMain(&appDesc, argc, argv);
|
||||||
@@ -51,6 +51,8 @@ int main(int argc, const char **argv) {
|
|||||||
}
|
}
|
||||||
bzLogInfo("[Breeze] User initialization (bzMain) successful.");
|
bzLogInfo("[Breeze] User initialization (bzMain) successful.");
|
||||||
|
|
||||||
|
InitWindow(appDesc.width, appDesc.height, appDesc.title);
|
||||||
|
SetTargetFPS(appDesc.fps);
|
||||||
// Initialize modules
|
// Initialize modules
|
||||||
|
|
||||||
// User initialize
|
// User initialize
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
#define BZ_GAME_ENTRYPOINT
|
||||||
#include <breeze.h>
|
#include <breeze.h>
|
||||||
|
|
||||||
#include <raylib.h>
|
#include <raylib.h>
|
||||||
|
|||||||
Reference in New Issue
Block a user