Yalir / sfeMovie

sfeMovie is a simple C++ library that lets you play movies in SFML based applications. It relies on FFmpeg to read medias and remains consistent with SFML's naming conventions.
http://sfemovie.yalir.org/
GNU Lesser General Public License v2.1
114 stars 37 forks source link

Consolidate CMake Variables #36

Closed firefly2442 closed 11 years ago

firefly2442 commented 11 years ago

In the CMakeDirected branch, there are currently two variables:

BUILD_FFMPEG (Boolean) LINK_AGAINST_PROVIDED_FFMPEG (Boolean)

Is there a reason to have two? If you're going to build FFmpeg, you're probably going to want to link against it no? Could these two be consolidated into just one variable?

Ceylo commented 11 years ago

If BUILD_FFMPEG is true, then LINK_AGAINST_PROVIDED_FFMPEG should also be true, but the opposite isn't true. You may want to link against the provided FFmpeg but not rebuild it (if no changes have been made to the enabled codecs). I admit it is mostly useful to sfeMovies' developers, but I did this because otherwise I don't know how to avoid rebuilding FFmpeg when no change to codecs have been made.

The best solution would be using an enumeration, with one constant for each of the 3 possible states, but I don't know (and I don't think) CMake supports this. That would need to be checked...

Ceylo commented 11 years ago

This has been fixed: there is no more BUILD_FFMPEG option in the CMake GUI and FFmpeg is (re)built only when required, ie. only when the configuration changed (new codec wanted, etc).