Skip to content

Instantly share code, notes, and snippets.

@LaurentGomila
Created February 18, 2013 21:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LaurentGomila/556168679ad8b5d6560e to your computer and use it in GitHub Desktop.
Save LaurentGomila/556168679ad8b5d6560e to your computer and use it in GitHub Desktop.
Quick and dirty CMake file for GLEW 1.6.0 (used on Windows - probably not portable)
set(CMAKE_C_OUTPUT_EXTENSION .o)
cmake_minimum_required(VERSION 2.8)
# set a default build type if none was provided
# this has to be done before the project() instruction!
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build (Debug or Release)" FORCE)
endif()
# project name
project(glew)
# add an option for choosing the build type (shared or static)
set(BUILD_SHARED_LIBS TRUE CACHE BOOL "TRUE to build jpeg as shared libraries, FALSE to build it as static libraries")
if (NOT BUILD_SHARED_LIBS)
add_definitions(-DGLEW_STATIC)
endif()
# source files
set(SRC
src/glew.c
)
include_directories(include)
# define the target
add_library(glew ${SRC})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment