got it working up until the demos, still need to check and redo all the tools

This commit is contained in:
Jip 2024-05-13 20:59:48 +02:00
parent 948bd8474c
commit 52b0e0671f
31 changed files with 297 additions and 271 deletions

View file

@ -4,9 +4,6 @@ project(rlgldemo)
# Adding Raylib
include(FetchContent)
set(FETCHCONTENT_QUIET FALSE)
set(BUILD_EXAMPLES OFF CACHE BOOL "" FORCE) # don't build the supplied examples
set(BUILD_GAMES OFF CACHE BOOL "" FORCE) # don't build the supplied example games
#set raylib settings
add_compile_definitions(SUPPORT_FILEFORMAT_JPG)
@ -17,20 +14,18 @@ FetchContent_Declare(
GIT_PROGRESS TRUE
)
FetchContent_MakeAvailable(raylib)
set_target_properties(raylib PROPERTIES FOLDER examples/deps)
set_target_properties(glfw PROPERTIES FOLDER examples/deps)
set_target_properties(update_mappings PROPERTIES FOLDER examples/deps)
include_directories(${FILEHANDLER_INCLUDE})
include_directories(${VITABOY_INCLUDE})
include_directories(${filehandler_SOURCE_DIR})
include_directories(${libvitaboy_SOURCE_DIR})
# Adding our source files
file(GLOB_RECURSE PROJECT_SOURCES CONFIGURE_DEPENDS "${CMAKE_CURRENT_LIST_DIR}/*.cpp") # Define PROJECT_SOURCES as a list of all source files
set(PROJECT_INCLUDE "${CMAKE_CURRENT_LIST_DIR}/*.h") # Define PROJECT_INCLUDE to be the path to the include directory of the project
set(RLGL_DEMO_SOURCES main.cpp)
# Declaring our executable
add_executable(${PROJECT_NAME})
target_sources(${PROJECT_NAME} PRIVATE ${PROJECT_SOURCES})
target_include_directories(${PROJECT_NAME} PRIVATE ${PROJECT_INCLUDE})
target_link_libraries(${PROJECT_NAME} PRIVATE raylib libvitaboy_static FileHandler_static)
add_executable(rlgldemo ${RLGL_DEMO_SOURCES})
target_link_libraries(rlgldemo PRIVATE raylib libvitaboy FileHandler)
# Setting ASSETS_PATH
target_compile_definitions(${PROJECT_NAME} PUBLIC ASSETS_PATH="${CMAKE_CURRENT_SOURCE_DIR}/assets/") # Set the asset path macro to the absolute path on the dev machine
#target_compile_definitions(${PROJECT_NAME} PUBLIC ASSETS_PATH="./assets") # Set the asset path macro in release mode to a relative path that assumes the assets folder is in the same directory as the game executable
set_target_properties(rlgldemo PROPERTIES FOLDER examples)

View file

@ -37,8 +37,8 @@
#include "rlgl.h"
#include <cassert>
#include <FileHandler.h>
#include "../libvitaboy/libvitaboy.hpp"
#include <FileHandler.hpp>
#include <libvitaboy.hpp>
#define SCREEN_WIDTH (800)
#define SCREEN_HEIGHT (600)