QGIS/cmake_templates/qgsconfig.h.in
2013-01-09 16:47:01 +01:00

51 lines
1.7 KiB
C

// QGSCONFIG.H
#ifndef QGSCONFIG_H
#define QGSCONFIG_H
// Version must be specified according to
// <int>.<int>.<int>-<any text>.
// or else upgrading old project file will not work
// reliably.
#define VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}-${RELEASE_NAME}"
//used in vim src/core/qgis.cpp
//The way below should work but it resolves to a number like 0110 which the compiler treats as octal I think
//because debuggin it out shows the decimal number 72 which results in incorrect version status.
//As a short term fix I (Tim) am defining the version in top level cmake. It would be good to
//reinstate this more generic approach below at some point though
//#define VERSION_INT ${CPACK_PACKAGE_VERSION_MAJOR}${CPACK_PACKAGE_VERSION_MINOR}${CPACK_PACKAGE_VERSION_PATCH}
#define VERSION_INT ${QGIS_VERSION_INT}
#define ABISYM(x) x ## ${QGIS_VERSION_INT}
//used in main.cpp and anywhere else where the release name is needed
#define RELEASE_NAME "${RELEASE_NAME}"
#define QGIS_PLUGIN_SUBDIR "${QGIS_PLUGIN_SUBDIR}"
#define QGIS_DATA_SUBDIR "${QGIS_DATA_SUBDIR}"
#define QGIS_LIBEXEC_SUBDIR "${QGIS_LIBEXEC_SUBDIR}"
#define QGIS_LIB_SUBDIR "${QGIS_LIB_SUBDIR}"
#define CMAKE_INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}"
#define CMAKE_SOURCE_DIR "${CMAKE_SOURCE_DIR}"
#define QSCINTILLA_VERSION_STR "${QSCINTILLA_VERSION_STR}"
//used by Mac to find system Qt plugins when bundle is run from build directory
#define QTPLUGINSDIR "${QT_PLUGINS_DIR}"
#cmakedefine HAVE_POSTGRESQL
#cmakedefine HAVE_SPATIALITE
#cmakedefine HAVE_MSSQL
#cmakedefine HAVE_ORACLE
#cmakedefine HAVE_PYTHON
#cmakedefine HAVE_TOUCH
#cmakedefine HAVE_OSGEARTHQT
#endif