diff options
| -rw-r--r-- | CMakeLists.txt | 11 | ||||
| -rw-r--r-- | include/rodeo.h (renamed from src/rodeo.h) | 0 | ||||
| -rwxr-xr-x | run | 3 | ||||
| -rw-r--r-- | src/lib/lib.c | 6 | ||||
| -rw-r--r-- | src/lib/lib.h | 3 | ||||
| -rw-r--r-- | src/main.c | 29 |
6 files changed, 5 insertions, 47 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index fb32fbf..387d90c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,26 +1,24 @@ cmake_minimum_required(VERSION 3.25.1) include(ExternalProject) -project(space_squad) +project(RodeoEngine) file(GLOB SOURCES - "src/main.c" "src/rodeo.c" ) #add_library(lib src/lib.c) -add_executable(${PROJECT_NAME} ${SOURCES}) +add_library(${PROJECT_NAME} ${SOURCES}) add_subdirectory(external/SDL) ExternalProject_Add(project_bgfx #BUILD_IN_SOURCE true # this just doesn't work - SOURCE_DIR "external/bgfx" - BINARY_DIR "../external/bgfx" + SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/external/bgfx" + BINARY_DIR "${CMAKE_CURRENT_SOURCE_DIR}/external/bgfx" DOWNLOAD_COMMAND "" CONFIGURE_COMMAND "" - #BUILD_ALWAYS true BUILD_COMMAND make linux INSTALL_COMMAND "" ) @@ -30,6 +28,7 @@ target_include_directories(${PROJECT_NAME} PUBLIC external/SDL/include PUBLIC external/bgfx/include PUBLIC external/bx/include + PUBLIC include ) target_link_directories(${PROJECT_NAME} diff --git a/src/rodeo.h b/include/rodeo.h index e468c11..e468c11 100644 --- a/src/rodeo.h +++ b/include/rodeo.h @@ -1,3 +0,0 @@ -#! /bin/sh - -./build_dir/space_squad diff --git a/src/lib/lib.c b/src/lib/lib.c deleted file mode 100644 index 4de4456..0000000 --- a/src/lib/lib.c +++ /dev/null @@ -1,6 +0,0 @@ -#include "lib.h" - -int add(int a, int b) -{ - return a + b; -} diff --git a/src/lib/lib.h b/src/lib/lib.h deleted file mode 100644 index 77a0e1e..0000000 --- a/src/lib/lib.h +++ /dev/null @@ -1,3 +0,0 @@ - -int -add(int a, int b); diff --git a/src/main.c b/src/main.c deleted file mode 100644 index 586d476..0000000 --- a/src/main.c +++ /dev/null @@ -1,29 +0,0 @@ -#include <stdio.h> -#include <stdbool.h> -#include "SDL2/SDL.h" -#include "SDL2/SDL_syswm.h" -#include "bgfx/c99/bgfx.h" - -#include "rodeo.h" - -Rodeo__Data_t _state = {0}; -Rodeo__Data_t* state = &_state; - -int -main() -{ - Rodeo__init_window(state, 480, 640, "Rodeo Window"); - - while(!state->quit) - { - Rodeo__begin(state); - - bgfx_dbg_text_printf(0, 2, 0x6f, "Description: Initialization and debug text."); - - Rodeo__end(state); - } - - Rodeo__deinit_window(state); - Rodeo__quit(); - return 0; -} |
