diff --git a/CMakeLists.txt b/CMakeLists.txt index f75b12d45..ec8fa9bc4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -64,6 +64,7 @@ install( FILES core/textdocumentgenerator.h core/textpage.h core/utils.h + core/version.h core/fileprinter.h DESTINATION ${INCLUDE_INSTALL_DIR}/okular/core ) diff --git a/aboutdata.h b/aboutdata.h index 26e4dbe51..42a2428d0 100644 --- a/aboutdata.h +++ b/aboutdata.h @@ -12,13 +12,15 @@ #include +#include "core/version.h" + inline KAboutData okularAboutData( const char* name, const char* iname ) { KAboutData about( name, //"okular", "okular", ki18n(iname), //I18N_NOOP("okular"), - "0.6.80", + OKULAR_VERSION_STRING, ki18n("Okular, a universal document viewer"), KAboutData::License_GPL, ki18n("(C) 2002 Wilco Greven, Christophe Devriese\n" diff --git a/core/version.h b/core/version.h new file mode 100644 index 000000000..5944bf261 --- /dev/null +++ b/core/version.h @@ -0,0 +1,24 @@ +/*************************************************************************** + * Copyright (C) 2008 by Pino Toscano * + * * + * This program is free software; you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation; either version 2 of the License, or * + * (at your option) any later version. * + ***************************************************************************/ + +#ifndef _OKULAR_VERSION_H_ +#define _OKULAR_VERSION_H_ + +#define OKULAR_VERSION_STRING "0.6.80" +#define OKULAR_VERSION_MAJOR 0 +#define OKULAR_VERSION_MINOR 6 +#define OKULAR_VERSION_RELEASE 80 +#define OKULAR_MAKE_VERSION( a,b,c ) (((a) << 16) | ((b) << 8) | (c)) + +#define OKULAR_VERSION \ + OKULAR_MAKE_VERSION(OKULAR_VERSION_MAJOR,OKULAR_VERSION_MINOR,OKULAR_VERSION_RELEASE) + +#define OKULAR_IS_VERSION(a,b,c) ( OKULAR_VERSION >= OKULAR_MAKE_VERSION(a,b,c) ) + +#endif