OpenShot/libopenshot-audio

Generate a version include, for library consumers?

ferdnyc opened this issue · 1 comments

So, I'm thinking that... eventually, at some point down the road — and with no real urgency — we'll want to start generating a version header from CMake, the same way we do for libopenshot.

I know, I know: I'm the one who removed the version header, on the grounds that it wasn't being used for anything. And, it wasn't, which is why this isn't urgent at all.

But, there's one place we could be using a version header, if we had one: FindOpenShotAudio.cmake.

Currently, the FindOpenShotAudio.cmake we have in libopenshot doesn't support version detection, reporting, or requirements. But if we wanted to add any of that, basically every FindXXX.cmake script handles version detection for library dependencies the same way:

  1. Detect the library's availability by finding its include directory in the usual fashion
  2. Load the library's public header file from that include path
  3. Read the version information from that header

It makes sense for libopenshot-audio to handle "publishing" its version information the same way. So eventually we should do that.

We can just copy-paste what libopenshot does to generate its version header, so it's really a simple fix. But there's also no point in rushing to do it, since it won't be useful until we also enhance FindOpenShotAudio.cmake to use that version information.

Don't know why I didn't mark #60 as fixing this, but it did. And OpenShot/libopenshot#277 added version checking to FindOpenShotAudio.cmake. Closing.