KhronosGroup / OpenCOLLADA

652 stars 252 forks source link

Proposal: Provide support for Release information in the API #605

Open gaiaclary opened 5 years ago

gaiaclary commented 5 years ago

I propose to add a headerfile to the installed API include files that contains preprocessor directives for the used library version, something similar to:

include/opencollada_version.h:

#ifndef OPENCOLLADA_VERSION
#define OPENCOLLADA_VERSION 1.6.68
#define OPENCOLLADA_VERSION_NUMBER 106068 // #.##.###
#define OPENCOLLADA_BUILDTYPE "CUSTOM" // or "RELEASE" when building from the release sources
#endif
RemiArnaud commented 5 years ago

COLLADABU/VersionInfo.h already contains the version number for there released packages.

const String CURRENT_REVISION = "1.6.68";

you can get the precompiled, or all the source of released versions on the 'release' tab

gaiaclary commented 5 years ago

Hi, Remi;

  1. While this header file exists in the released Opencollada sources, it does not get installed into the API-include directory. So when we finally build Blender from the installed openCollada library, then we can not figure out the Collada library version just from the API includes. There is no information in the API headers that tells us in any way what version of the library this is.

  2. Even if the header file would actually be installed, it still would be useless because it only contains a C variable, while we need to have a c-preprocessor definition, so that we can add #if ... #endif brackets into the source code to support different collada library API versions.

  3. Also the release number "1.6.68" is not easy to handle when it comes to greater/smaller comparison, that is why i proposed the releasenumber 106068 (##.##.###) in addition to the release version string, again as a preprocessor define.

RemiArnaud commented 5 years ago

I understand. Thanks!

gaiaclary commented 5 years ago

and... no action ? :(