project('glew', 'c') gl = dependency('gl') inc = include_directories('include') c_args = ['-DGLEW_STATIC'] lib = static_library('glew', 'src/glew.c', include_directories: inc, c_args: c_args, dependencies: gl) libglew_dep = declare_dependency(include_directories: inc, link_with: lib, compile_args: c_args)