Skip to content

Instantly share code, notes, and snippets.

View christophercrouzet's full-sized avatar

Christopher Crouzet christophercrouzet

View GitHub Profile
@christophercrouzet
christophercrouzet / glew.cmake
Created August 5, 2014 12:58
Helper to build GLEW statically with CMake
# Tested only on Mac OS X Mavericks with GLEW v1.10.0.
function(build_glew root_dir)
set(glew_lib GLEW)
if (APPLE)
set(glew_platform_libs "-framework AGL" "-framework OpenGL")
elseif (WIN32)
set(glew_lib glew32)
set(glew_platform_libs opengl32 glu32)
else()
@christophercrouzet
christophercrouzet / tests.cmake
Last active August 29, 2015 14:04
Heper to add tests in CMake
include(CMakeParseArguments)
function(create_test target_name)
set(options)
set(single_value_args FILE OUTPUT_DIR NAME)
set(multi_value_args LINK_LIBS)
cmake_parse_arguments(
create_test
"${options}"