diff --git a/indra/llimagej2coj/llimagej2coj.cpp b/indra/llimagej2coj/llimagej2coj.cpp index 78d1e0313b..0e605cf8b2 100644 --- a/indra/llimagej2coj/llimagej2coj.cpp +++ b/indra/llimagej2coj/llimagej2coj.cpp @@ -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