updated cmake
This commit is contained in:
parent
b65ce85405
commit
0f03d88b26
8 changed files with 20 additions and 20 deletions
|
|
@ -110,15 +110,17 @@ if(ARCHEUS_STD_GLFW)
|
||||||
list(APPEND ARCHEUS_STD_SOURCES ${ARCHEUS_STD_GLFW_SOURCES})
|
list(APPEND ARCHEUS_STD_SOURCES ${ARCHEUS_STD_GLFW_SOURCES})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_library(archeus_std SHARED
|
if(WIN32 AND NOT MSVC)
|
||||||
${ARCHEUS_STD_SOURCES}
|
add_library(archeus_std STATIC ${ARCHEUS_STD_SOURCES})
|
||||||
)
|
else()
|
||||||
|
add_library(archeus_std SHARED ${ARCHEUS_STD_SOURCES})
|
||||||
|
endif()
|
||||||
|
|
||||||
if(ARCHEUS_STD_SDL)
|
if(ARCHEUS_STD_SDL)
|
||||||
target_include_directories(archeus_std PRIVATE
|
target_include_directories(archeus_std
|
||||||
include
|
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||||
PUBLIC ${SDL2_INCLUDE_DIRS}
|
PRIVATE ${SDL2_INCLUDE_DIRS}
|
||||||
PUBLIC ${SDL2IMAGE_INCLUDE_DIRS}
|
PRIVATE ${SDL2IMAGE_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(archeus_std PUBLIC ${SDL2_LIBRARIES} SDL2_image::SDL2_image)
|
target_link_libraries(archeus_std PUBLIC ${SDL2_LIBRARIES} SDL2_image::SDL2_image)
|
||||||
|
|
@ -126,7 +128,7 @@ endif()
|
||||||
|
|
||||||
if(ARCHEUS_STD_OPENGL)
|
if(ARCHEUS_STD_OPENGL)
|
||||||
target_include_directories(archeus_std PRIVATE
|
target_include_directories(archeus_std PRIVATE
|
||||||
include
|
PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||||
GL
|
GL
|
||||||
glfw
|
glfw
|
||||||
GLEW
|
GLEW
|
||||||
|
|
|
||||||
|
|
@ -2,10 +2,9 @@
|
||||||
#define ARC_SDL_RENDERER_H_
|
#define ARC_SDL_RENDERER_H_
|
||||||
|
|
||||||
#ifdef ARC_SDL
|
#ifdef ARC_SDL
|
||||||
|
|
||||||
#include <SDL.h>
|
|
||||||
#include "arc/graphics/renderer.h"
|
#include "arc/graphics/renderer.h"
|
||||||
#include "arc/graphics/window.h"
|
#include "arc/graphics/window.h"
|
||||||
|
#include <SDL.h>
|
||||||
|
|
||||||
typedef SDL_Renderer ARC_RendererType;
|
typedef SDL_Renderer ARC_RendererType;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,8 @@
|
||||||
#define ARC_SDL_SPRITE_H_
|
#define ARC_SDL_SPRITE_H_
|
||||||
|
|
||||||
#ifdef ARC_SDL
|
#ifdef ARC_SDL
|
||||||
|
|
||||||
#include <SDL.h>
|
|
||||||
#include "arc/graphics/sprite.h"
|
#include "arc/graphics/sprite.h"
|
||||||
|
#include <SDL.h>
|
||||||
|
|
||||||
struct ARC_Sprite {
|
struct ARC_Sprite {
|
||||||
ARC_Spritesheet *spritesheet;
|
ARC_Spritesheet *spritesheet;
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,8 @@
|
||||||
#define ARC_SDL_SPRITESHEET_H_
|
#define ARC_SDL_SPRITESHEET_H_
|
||||||
|
|
||||||
#ifdef ARC_SDL
|
#ifdef ARC_SDL
|
||||||
|
|
||||||
#include <SDL.h>
|
|
||||||
#include "arc/graphics/spritesheet.h"
|
#include "arc/graphics/spritesheet.h"
|
||||||
|
#include <SDL.h>
|
||||||
|
|
||||||
struct ARC_Spritesheet {
|
struct ARC_Spritesheet {
|
||||||
SDL_Texture *texture;
|
SDL_Texture *texture;
|
||||||
|
|
|
||||||
|
|
@ -2,9 +2,8 @@
|
||||||
#define ARC_SDL_WINDOW_H_
|
#define ARC_SDL_WINDOW_H_
|
||||||
|
|
||||||
#ifdef ARC_SDL
|
#ifdef ARC_SDL
|
||||||
|
|
||||||
#include <SDL.h>
|
|
||||||
#include "arc/graphics/window.h"
|
#include "arc/graphics/window.h"
|
||||||
|
#include <SDL.h>
|
||||||
|
|
||||||
typedef SDL_Window ARC_WindowType;
|
typedef SDL_Window ARC_WindowType;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@
|
||||||
#define ARC_SDL_KEYBOARD_H_
|
#define ARC_SDL_KEYBOARD_H_
|
||||||
|
|
||||||
#ifdef ARC_SDL
|
#ifdef ARC_SDL
|
||||||
#include <SDL.h>
|
|
||||||
#include "arc/input/keyboard.h"
|
#include "arc/input/keyboard.h"
|
||||||
|
#include <SDL.h>
|
||||||
|
|
||||||
struct ARC_Keyboard {
|
struct ARC_Keyboard {
|
||||||
SDL_Event *event;
|
SDL_Event *event;
|
||||||
|
|
|
||||||
|
|
@ -10,12 +10,12 @@
|
||||||
|
|
||||||
//NOTE: some of this file is temporary, mostly to get smthn running so I can test out different ideas
|
//NOTE: some of this file is temporary, mostly to get smthn running so I can test out different ideas
|
||||||
#ifdef ARC_SDL
|
#ifdef ARC_SDL
|
||||||
#include <SDL.h>
|
|
||||||
#include <SDL_video.h>
|
|
||||||
#include "arc/graphics/sdl/window.h"
|
#include "arc/graphics/sdl/window.h"
|
||||||
#include "arc/graphics/sdl/renderer.h"
|
#include "arc/graphics/sdl/renderer.h"
|
||||||
#include "arc/input/sdl/mouse.h"
|
#include "arc/input/sdl/mouse.h"
|
||||||
#include "arc/input/sdl/keyboard.h"
|
#include "arc/input/sdl/keyboard.h"
|
||||||
|
#include <SDL.h>
|
||||||
|
#include <SDL_video.h>
|
||||||
#elif ARC_OPENGL
|
#elif ARC_OPENGL
|
||||||
#include "arc/graphics/opengl/window.h"
|
#include "arc/graphics/opengl/window.h"
|
||||||
#include "arc/graphics/opengl/renderer.h"
|
#include "arc/graphics/opengl/renderer.h"
|
||||||
|
|
@ -95,6 +95,8 @@ void ARC_Engine_Run(ARC_EngineData *data){
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ARC_SDL
|
#ifdef ARC_SDL
|
||||||
|
SDL_SetRenderDrawBlendMode((SDL_Renderer *)data->renderer, SDL_BLENDMODE_BLEND);
|
||||||
|
|
||||||
SDL_Event *event = data->mouse->event;
|
SDL_Event *event = data->mouse->event;
|
||||||
double lastTime = 0, currentTime;
|
double lastTime = 0, currentTime;
|
||||||
data->dt = 0;
|
data->dt = 0;
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@
|
||||||
#include "arc/graphics/window.h"
|
#include "arc/graphics/window.h"
|
||||||
#include "arc/graphics/sdl/window.h"
|
#include "arc/graphics/sdl/window.h"
|
||||||
|
|
||||||
#include <SDL.h>
|
|
||||||
#include "arc/std/errno.h"
|
#include "arc/std/errno.h"
|
||||||
|
#include <SDL.h>
|
||||||
|
|
||||||
void ARC_Window_Create(ARC_Window **window, ARC_WindowInfo *info){
|
void ARC_Window_Create(ARC_Window **window, ARC_WindowInfo *info){
|
||||||
if(!info){
|
if(!info){
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue