GLFW window

This commit is contained in:
2020-06-19 09:38:38 +02:00
parent 1b46635045
commit bf9b798c28
4 changed files with 57 additions and 0 deletions

17
CMakeLists.txt Normal file
View File

@ -0,0 +1,17 @@
project(minecraft-clone C)
cmake_minimum_required(VERSION 3.9)
include_directories(src)
file(GLOB SOURCES "src/*.c")
find_program(CCACHE_PROGRAM ccache)
add_executable(test.out ${SOURCES})
if(CCACHE_PROGRAM)
set(CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}")
endif()
set(OpenGL_GL_PREFERENCE GLVND)
find_package(OpenGL REQUIRED)
if(NOT OPENGL_FOUND)
message("ERROR: OpenGL not found")
endif(NOT OPENGL_FOUND)
set(GL_LIBRARY GL GLU X11)
target_link_libraries(test.out glfw GLEW )
target_link_libraries(test.out OpenGL::GL)