openimageio: extract version #453

This commit is contained in:
nick black 2020-04-24 04:13:53 -04:00 committed by Nick Black
parent 3624953700
commit 642a687601
3 changed files with 11 additions and 2 deletions

View File

@ -18,6 +18,10 @@ extern "C" {
#include <libswscale/version.h>
#include <libavformat/version.h>
#include <libavformat/avformat.h>
#else
#ifdef USE_OIIO
const char* oiio_version(void);
#endif
#endif
#include <term.h>

View File

@ -936,15 +936,15 @@ notcurses* notcurses_init(const notcurses_options* opts, FILE* outfp){
LIBAVFORMAT_VERSION_MAJOR, LIBAVFORMAT_VERSION_MINOR, LIBAVFORMAT_VERSION_MICRO,
LIBAVUTIL_VERSION_MAJOR, LIBAVUTIL_VERSION_MINOR, LIBAVUTIL_VERSION_MICRO,
LIBSWSCALE_VERSION_MAJOR, LIBSWSCALE_VERSION_MINOR, LIBSWSCALE_VERSION_MICRO);
fflush(stdout);
#else
#ifdef USE_OIIO
// FIXME
printf(" openimageio %s\n", oiio_version());
#else
term_fg_palindex(ret, ret->ttyfp, ret->colors <= 88 ? 1 % ret->colors : 0xcb);
fprintf(stderr, "\n Warning! Notcurses was built without multimedia support\n");
#endif
#endif
fflush(stdout);
term_fg_palindex(ret, ret->ttyfp, ret->colors <= 88 ? 1 % ret->colors : 0xcb);
if(!ret->RGBflag){ // FIXME
fprintf(stderr, "\n Warning! Colors subject to https://github.com/dankamongmen/notcurses/issues/4");

View File

@ -1,5 +1,6 @@
#include "version.h"
#ifdef USE_OIIO
#include <OpenImageIO/version.h>
#include <OpenImageIO/imageio.h>
#include "internal.h"
@ -125,6 +126,10 @@ void ncvisual_destroy(ncvisual* ncv){
}
}
const char* oiio_version(void){
return OIIO_VERSION_STRING;
}
} // extern "C"
#endif