Skip to content

Commit 488aee5

Browse files
author
timlinux
committed
Fix for ticket #1047
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@8739 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent a69e63c commit 488aee5

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

CMakeLists.txt

+7-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ SET(COMPLETE_VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINO
55
SET(RELEASE_NAME "Metis")
66
SET(PROJECT_VERSION ${COMPLETE_VERSION})
77
PROJECT(qgis${PROJECT_VERSION})
8-
8+
SET(QGIS_VERSION_INT 1100)
99

1010
# TODO:
1111
# - install includes for libs
@@ -26,6 +26,12 @@ SET(CMAKE_COLOR_MAKEFILE ON)
2626
# set path to additional CMake modules
2727
SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
2828

29+
# in generated makefiles use relative paths so the project dir is moveable
30+
# Note commented out since it cause problems but it would be nice to resolve these and enable
31+
#
32+
# issue is caused by INCLUDE_DIRECTORIES(${CMAKE_BINARY_DIR}) near the end of this file generating incorrect path
33+
#SET (CMAKE_USE_RELATIVE_PATHS ON)
34+
2935
# it's possible to set PLUGINS_ALSO_BINARIES to TRUE
3036
# then some plugins that can run as standalone apps will be built
3137
# also as standalone apps

cmake_templates/qgsconfig.h.in

+6-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,12 @@
1111
#define VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}-${RELEASE_NAME}"
1212

1313
//used in vim src/core/qgis.cpp
14-
#define VERSION_INT ${CPACK_PACKAGE_VERSION_MAJOR}${CPACK_PACKAGE_VERSION_MINOR}${CPACK_PACKAGE_VERSION_PATCH}
14+
//The way below should work but it resolves to a number like 0110 which the compiler treats as octal I think
15+
//because debuggin it out shows the decimal number 72 which results in incorrect version status.
16+
//As a short term fix I (Tim) am defining the version in top level cmake. It would be good to
17+
//reinstate this more generic approach below at some point though
18+
//#define VERSION_INT ${CPACK_PACKAGE_VERSION_MAJOR}${CPACK_PACKAGE_VERSION_MINOR}${CPACK_PACKAGE_VERSION_PATCH}
19+
#define VERSION_INT ${QGIS_VERSION_INT}
1520
//used in main.cpp and anywhere else where the release name is needed
1621
#define RELEASE_NAME "${RELEASE_NAME}"
1722

src/app/qgisapp.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -4276,7 +4276,9 @@ void QgisApp::socketConnectionClosed()
42764276
{
42774277
versionInfo += parts[1] + "\n\n" + tr("Would you like more information?");
42784278
;
4279-
QMessageBox::StandardButton result = QMessageBox::information(this, tr("QGIS Version Information"), versionInfo, QMessageBox::Ok | QMessageBox::Cancel);
4279+
QMessageBox::StandardButton result = QMessageBox::information(this,
4280+
tr("QGIS Version Information"), versionInfo, QMessageBox::Ok |
4281+
QMessageBox::Cancel);
42804282
if (result == QMessageBox::Ok)
42814283
{
42824284
// show more info

0 commit comments

Comments
 (0)