95 lines
2.2 KiB
CMake
95 lines
2.2 KiB
CMake
cmake_minimum_required(VERSION 3.15)
|
|
<<<<<<< HEAD
|
|
project(Programmieren_3b LANGUAGES CXX)
|
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
include(FetchContent)
|
|
|
|
# -----------------------------
|
|
# Raylib
|
|
# -----------------------------
|
|
=======
|
|
project(Prog3B)
|
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
|
|
# WICHTIG: wegen raylib + neuer CMake-Version
|
|
set(CMAKE_POLICY_VERSION_MINIMUM 3.5)
|
|
|
|
include(FetchContent)
|
|
|
|
>>>>>>> freund/main
|
|
FetchContent_Declare(
|
|
raylib
|
|
GIT_REPOSITORY https://github.com/raysan5/raylib.git
|
|
GIT_TAG 5.0
|
|
)
|
|
<<<<<<< HEAD
|
|
FetchContent_MakeAvailable(raylib)
|
|
|
|
# -----------------------------
|
|
# pybind11
|
|
# -----------------------------
|
|
FetchContent_Declare(
|
|
pybind11
|
|
GIT_REPOSITORY https://github.com/pybind/pybind11.git
|
|
GIT_TAG v2.11.1
|
|
)
|
|
FetchContent_MakeAvailable(pybind11)
|
|
|
|
# -----------------------------
|
|
# Executable für das Spiel
|
|
# -----------------------------
|
|
add_executable(Programmieren_3b
|
|
=======
|
|
|
|
FetchContent_MakeAvailable(raylib)
|
|
|
|
add_executable(Prog3B
|
|
>>>>>>> freund/main
|
|
main.cpp
|
|
gamecube.cpp
|
|
gamematrix.cpp
|
|
)
|
|
|
|
<<<<<<< HEAD
|
|
target_link_libraries(Programmieren_3b PRIVATE raylib)
|
|
|
|
# Windows-spezifische Abhängigkeiten für raylib
|
|
if(WIN32)
|
|
target_link_libraries(Programmieren_3b PRIVATE opengl32 gdi32 winmm kernel32)
|
|
endif()
|
|
|
|
target_include_directories(Programmieren_3b PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
# -----------------------------
|
|
# Python-Modul
|
|
# -----------------------------
|
|
pybind11_add_module(gamematrix_python
|
|
bindings.cpp
|
|
gamematrix.cpp
|
|
)
|
|
|
|
# Python-Modul braucht die Header
|
|
target_include_directories(gamematrix_python PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
|
|
|
|
# Raylib ist für das Python-Modul nicht nötig, nur für C++ Executable
|
|
# Optional: Falls du Gamematrix aus Python auch mit Raylib testen willst, kann man linken
|
|
# target_link_libraries(gamematrix_python PRIVATE raylib)
|
|
=======
|
|
target_include_directories(Prog3B PRIVATE .)
|
|
target_link_libraries(Prog3B raylib)
|
|
|
|
# macOS-Frameworks nicht vergessen:
|
|
if(APPLE)
|
|
target_link_libraries(Prog3B
|
|
"-framework Cocoa"
|
|
"-framework IOKit"
|
|
"-framework CoreVideo"
|
|
"-framework OpenGL"
|
|
)
|
|
endif()
|
|
>>>>>>> freund/main
|