matus-chochlik / oglplu2

Wrapper for OpenGL, OpenAL and EGL including utilities for writing distributed applications with graphics and/or audio rendering.
Boost Software License 1.0
89 stars 11 forks source link

Integrating in another cmake project #12

Open niliopoulos opened 5 years ago

niliopoulos commented 5 years ago

Hello, We want to integrate oglplu2 into another CMake project (a GL library). Some of our library's specifications are:

  1. Context creation / GL loader agnostic.
  2. Updating oglplu2 to a newer revision should be done within our projects CMake configuration step and not as an additional configure/make install step.

With the current oglplu2 it seems we cannot achieve these two requirements without extensive modifications to the CMake configuration of oglplu2.

Is there a different approach that comes in mind or we need a pre-processing step to generate the oglplu2 headers?

Thank you!

matus-chochlik commented 3 years ago

Hi, first I apologize for this terribly late answer.

Recently I've split the code into several sub-modules and each of them is defining cmake exports and it should be possible just to include them with add_subdirectory to your project:

This is still work-in-progress, but it should already be usable.

HTH