Hi,
as a developer of KTechLab [1], it would be easier for me to support new/multiple versions of gpsim if there was an easily accessible way of finding the version of gpsim, during the configure/buildsystem generation phase of compilation.
Different versions of gpsim are not 100% compatible, which is normal, but because the version of gpsim is not exposed, I end up writing specific compilation tests for various versions of gpsim. This is tedious and error prone [2].
One simple solution would be to generate a version.h header with the contents like:
#define GPSIM_VERSION_MAJOR 0
#define GPSIM_VERSION_MAJOR 31
#define GPSIM_VERSION_BUILD 0
Then based on this header, the application code can have #ifs for ranges of versions, if the API is modified.
Other option might be be to ship some kind of pkg-config description file with the version number included, but I'm not familiar with that.
[1]
https://userbase.kde.org/KTechlab
[2]
https://cgit.kde.org/ktechlab.git/tree/cmake/modules/FindGPSim.cmake#n64
Best regards,
Zoltan
Anonymous