This is a comprehensive CMakeLists.txt for this project which I created for my personal use. I thought you might want it because the current CMakeLists.txt is far from ideal.
The usage is as simple as it is elegant. You can make this as usual which will generate the source files (.h and .c) and create *config.cmake and *targets.cmake files. These will then be automatically used by CMake and allow you to do the following in your project:
find_project(gl3w REQUIRED)
# ...
add_executable(myapp foo.c bar.c) # or add_library(), whatever
target_link_libraries(myapp gl3w) # <= this line is important
The last line will automatically include the gl3w headers, it will automatically link "myapp" to OpenGL (as the gl3w CMake pulls this dependency) and it will automatically compile gl3w.c.
This is a comprehensive CMakeLists.txt for this project which I created for my personal use. I thought you might want it because the current CMakeLists.txt is far from ideal.
The usage is as simple as it is elegant. You can
make
this as usual which will generate the source files (.h and .c) and create*config.cmake
and*targets.cmake
files. These will then be automatically used by CMake and allow you to do the following in your project:The last line will automatically include the gl3w headers, it will automatically link "myapp" to OpenGL (as the gl3w CMake pulls this dependency) and it will automatically compile
gl3w.c
.Hope you find this useful. Thanks for gl3w!