Skip to content

Instantly share code, notes, and snippets.

@charafau
Created October 21, 2020 02:53
Show Gist options
  • Save charafau/c354a63256d68720c69ed81a171d252a to your computer and use it in GitHub Desktop.
Save charafau/c354a63256d68720c69ed81a171d252a to your computer and use it in GitHub Desktop.
fedora glfw and glew cmake project file
cmake_minimum_required(VERSION 3.0.0)
project(projectname VERSION 0.1.0)
include(CTest)
enable_testing()
find_package(OpenGL REQUIRED)
find_package(PkgConfig REQUIRED)
pkg_search_module(GLFW REQUIRED glfw3)
find_package(GLEW REQUIRED)
include_directories(${OPENGL_INCLUDE_DIRS} ${GLFW_INCLUDE_DIRS} ${GLEW_INCLUDE_DIRS})
add_executable(projectname main.cpp)
set(CPACK_PROJECT_NAME ${PROJECT_NAME})
set(CPACK_PROJECT_VERSION ${PROJECT_VERSION})
include(CPack)
target_link_libraries(${PROJECT_NAME} ${OPENGL_gl_LIBRARY} ${GLEW_LIBRARIES} ${GLFW_LIBRARIES})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment