xca/lib/version.cpp
Christian Hohnstädt 68273d0a30 Switch from autotools/qmake to cmake
Why?
 - QT will switch from qmake to cmake sooner or later.
 - autotools are good for unix-ish systems, cmake also for
   macOS and Xcode as well as Windows and VS-code
 - Cross compiling the windows-binaries on linux
   is not very helpful to attract windows-centric
   developers.

Also drop qmake's xca.pro
Generate man-page and sphinx sources of commandline arguments
during build by executing xca (xcadoc.cpp).
Generating Version-patchlevel and git hash is now also
OS independent.
2021-06-01 17:48:37 +02:00

29 lines
583 B
C++

/* vi: set sw=4 ts=4:
*
* Copyright (C) 2018 Christian Hohnstaedt.
*
* All rights reserved.
* Compiles much faster than MW_help.cpp
* and needs to get recompiled every time
*/
#include "local.h"
#define VERSION XCA_VERSION
#ifdef GIT_LOCAL_CHANGES
#define COMMITHASH GIT_COMMIT_REV "+local-changes"
#else
#define COMMITHASH GIT_COMMIT_REV
#endif
const char *version_str(bool html)
{
if (!COMMITHASH[0])
return html ? "<b>" VERSION "</b>" : VERSION;
return html ?
"<b>" VERSION "-dev</b><br/>commit: <b>" COMMITHASH "</b>" :
VERSION "-dev\ncommit: " COMMITHASH;
}