Projekt hinzugefügt
This commit is contained in:
parent
72321439e5
commit
b564417b08
22
CMakeLists.txt
Normal file
22
CMakeLists.txt
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
cmake_minimum_required(VERSION 3.20)
|
||||||
|
project(Beskar C CXX)
|
||||||
|
|
||||||
|
set(CMAKE_CXX_STANDARD 17)
|
||||||
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
|
# Raylib-Einstellungen (sorgt dafür, dass wir nur das bauen, was wir brauchen)
|
||||||
|
set(BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
|
||||||
|
set(BUILD_TESTS OFF CACHE BOOL "" FORCE)
|
||||||
|
set(BUILD_SHARED_LIBS OFF CACHE BOOL "" FORCE)
|
||||||
|
|
||||||
|
# Raylib hinzufügen
|
||||||
|
add_subdirectory(raylib)
|
||||||
|
|
||||||
|
# Dein Spiel-Executable
|
||||||
|
add_executable(Beskar src/main.cpp)
|
||||||
|
|
||||||
|
# Verknüpfung: Dein Spiel benötigt Raylib
|
||||||
|
target_link_libraries(Beskar PRIVATE raylib)
|
||||||
|
|
||||||
|
# Header-Verzeichnis für Raylib damit C++ es findet
|
||||||
|
target_include_directories(Beskar PRIVATE raylib/src)
|
||||||
15
src/main.cpp
Normal file
15
src/main.cpp
Normal file
|
|
@ -0,0 +1,15 @@
|
||||||
|
#include "raylib.h"
|
||||||
|
|
||||||
|
int main() {
|
||||||
|
InitWindow(800, 600, "Beskar Projekt");
|
||||||
|
|
||||||
|
while (!WindowShouldClose()) {
|
||||||
|
BeginDrawing();
|
||||||
|
ClearBackground(BLACK);
|
||||||
|
DrawText("Beskar ist bereit!", 10, 10, 20, RAYWHITE);
|
||||||
|
EndDrawing();
|
||||||
|
}
|
||||||
|
|
||||||
|
CloseWindow();
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user