set version in qglobal header during configuration

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2016-01-27 14:10:40 +02:00
parent 1d5f156a6e
commit 2fe6525ad4
5 changed files with 8 additions and 9 deletions

View file

@ -213,7 +213,11 @@ configure_file(
${CMAKE_BINARY_DIR}/include/qconfig.cpp
)
configure_file(
${CMAKE_SOURCE_DIR}/src/core/global/qglobal.h
${CMAKE_SOURCE_DIR}/src/core/global/qglobal.h.cmake
${CMAKE_BINARY_DIR}/include/QtCore/qglobal.h
)
configure_file(
${CMAKE_SOURCE_DIR}/src/core/global/qglobal.h.cmake
${CMAKE_BINARY_DIR}/include/qtglobal.h
)

View file

@ -2,6 +2,7 @@ string(TIMESTAMP KATIE_DATE "%Y-%m-%d")
set(KATIE_MAJOR "4")
set(KATIE_MINOR "8")
set(KATIE_MICRO "7")
set(KATIE_HEX "0x040807")
set(KATIE_NAME "Katie")
set(KATIE_VERSION "${KATIE_MAJOR}.${KATIE_MINOR}.${KATIE_MICRO}")
set(KATIE_STRING "qt4 ${KATIE_MAJOR}.${KATIE_MINOR}.${KATIE_MICRO}")

View file

@ -1,6 +1,5 @@
set(CORE_HEADERS
${CORE_HEADERS}
${CMAKE_CURRENT_SOURCE_DIR}/global/qglobal.h
${CMAKE_CURRENT_SOURCE_DIR}/global/qnamespace.h
${CMAKE_CURRENT_SOURCE_DIR}/global/qendian.h
${CMAKE_CURRENT_SOURCE_DIR}/global/qnumeric.h

View file

@ -268,7 +268,4 @@
#cmakedefine QT_NO_TREEWIDGET
#cmakedefine QT_NO_VALIDATOR
/* Windows */
#cmakedefine QT_NO_WIN_ACTIVEQT
#endif

View file

@ -47,11 +47,11 @@
#include <stdlib.h>
#include <string.h>
#define QT_VERSION_STR "4.8.7"
#define QT_VERSION_STR "${KATIE_VERSION}"
/*
QT_VERSION is (major << 16) + (minor << 8) + patch.
*/
#define QT_VERSION 0x040807
#define QT_VERSION ${KATIE_HEX}
/*
can be used like #if (QT_VERSION >= QT_VERSION_CHECK(4, 4, 0))
*/
@ -145,9 +145,7 @@
# error Unable to detect target endianness
#endif
#if !defined(QT_BUILD_MOC)
#include <QtCore/qconfig.h>
#endif
#ifdef __cplusplus