Cleanup openjpeg2 includes and version string creation.

master
Liny 2021-05-15 18:21:52 -07:00
parent 43628bba45
commit ae88588b55
1 changed files with 7 additions and 1 deletions

View File

@ -26,12 +26,14 @@
#include "linden_common.h"
#include "llimagej2coj.h"
#define OPENJPEG2
// this is defined so that we get static linking.
#include "openjpeg.h"
#ifndef OPENJPEG2
#include "cio.h"
#endif
#include "event.h"
#define OPENJPEG2
#include "lltimer.h"
@ -177,9 +179,13 @@ std::string LLImageJ2COJ::getEngineInfo() const
+ opj_version();
#elif defined OPJ_PACKAGE_VERSION
return std::string("OpenJPEG: " OPJ_PACKAGE_VERSION ", Runtime: ") + opj_version();
#else
#ifdef OPENJPEG2
return llformat("OpenJPEG: %i.%i.%i, Runtime: %s", OPJ_VERSION_MAJOR, OPJ_VERSION_MINOR, OPJ_VERSION_BUILD, opj_version());
#else
return std::string("OpenJPEG Runtime: ") + opj_version();
#endif
#endif
}
// Return string from message, eliminating final \n if present