GLFW window
This commit is contained in:
17
CMakeLists.txt
Normal file
17
CMakeLists.txt
Normal 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)
|
||||
Reference in New Issue
Block a user