diff --git a/CMakeLists.txt b/CMakeLists.txt index 15c7cba..f22dc93 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -49,6 +49,7 @@ configure_file( # Find and include OpenGL find_package(OpenGL REQUIRED) +find_package(raylib REQUIRED) # Add glad library add_library(glad "${PROJECT_SOURCE_DIR}/src/glad.c") diff --git a/CMakePresets.json b/CMakePresets.json index a5f0bcf..cc68836 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -22,10 +22,10 @@ "hidden": true, "cacheVariables": { "CMAKE_C_EXTENSIONS": "OFF", - "CMAKE_C_STANDARD": "23", + "CMAKE_C_STANDARD": "20", "CMAKE_C_STANDARD_REQUIRED": "ON", "CMAKE_CXX_EXTENSIONS": "OFF", - "CMAKE_CXX_STANDARD": "23", + "CMAKE_CXX_STANDARD": "20", "CMAKE_CXX_STANDARD_REQUIRED": "ON" } }, diff --git a/cmake/3rd.cmake b/cmake/3rd.cmake index 8952b82..436a587 100644 --- a/cmake/3rd.cmake +++ b/cmake/3rd.cmake @@ -73,12 +73,7 @@ endif () CPMAddPackage( NAME raylib GITHUB_REPOSITORY raysan5/raylib - GIT_TAG 4.5.0 - DOWNLOAD_ONLY True) -if (raylib_ADDED) - add_library(raylib INTERFACE IMPORTED) - target_include_directories(raylib INTERFACE ${raylib_SOURCE_DIR}) -endif () + GIT_TAG 5.0 ) # https://gitlab.com/libeigen/eigen.git CPMAddPackage( @@ -212,12 +207,6 @@ else () message(FATAL_ERROR "OpenGL not found. Please install OpenGL.") endif () -# Find raylib -find_package(raylib REQUIRED) -if (NOT raylib_FOUND) - message(FATAL_ERROR "raylib not found. Please install raylib.") -endif () - # Find spdlog find_package(spdlog REQUIRED) if (NOT spdlog_FOUND) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index f8d6429..b1a3e5b 100755 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -37,6 +37,7 @@ link_libraries( ${glog_LIBRARIES} SimpleRenderer glad + raylib OpenGL::GL ) diff --git a/test/system_test/CMakeLists.txt b/test/system_test/CMakeLists.txt index da351e3..b44d38d 100755 --- a/test/system_test/CMakeLists.txt +++ b/test/system_test/CMakeLists.txt @@ -18,6 +18,7 @@ target_include_directories(system_test PRIVATE ${CMAKE_SOURCE_DIR}/src/include ${CMAKE_CURRENT_SOURCE_DIR} ${raylib_INCLUDE_DIRS} + ${raylib_SOURCE_DIR}/src ) # Compile options diff --git a/test/system_test/Window.cpp b/test/system_test/Window.cpp index 450481a..a5f70b8 100644 --- a/test/system_test/Window.cpp +++ b/test/system_test/Window.cpp @@ -1,5 +1,4 @@ #include "Window.hpp" -#include #include Window::Window(int width, int height) :