Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Build: Bump minimum Proj version to 4.9.3 (Fixes #30675)
  • Loading branch information
marisn authored and nyalldawson committed Aug 3, 2019
1 parent 53de10f commit 7e0181b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion INSTALL
Expand Up @@ -99,7 +99,7 @@ Required build tools:
Required build dependencies:

- Qt >= 5.9.0
- Proj >= 4.4.x
- Proj >= 4.9.3
- GEOS >= 3.4
- Sqlite3 >= 3.0.0
- SpatiaLite >= 4.2.0
Expand Down
14 changes: 13 additions & 1 deletion cmake/FindProj.cmake
Expand Up @@ -61,7 +61,19 @@ IF (PROJ_FOUND)
MESSAGE (FATAL_ERROR "Cannot build QGIS using Proj ${PROJ_VERSION_MAJOR}.${PROJ_VERSION_MINOR}.${PROJ_VERSION_PATCH} Use 6.1.0 or higher.")
ENDIF ((PROJ_VERSION_MAJOR EQUAL 6) AND (PROJ_VERSION_MINOR EQUAL 0))
ELSE(EXISTS ${PROJ_INCLUDE_DIR}/proj.h)
SET(PROJ_VERSION_MAJOR 4)
FILE(READ ${PROJ_INCLUDE_DIR}/proj_api.h proj_version)
STRING(REGEX REPLACE "^.*PJ_VERSION ([0-9]+).*$" "\\1" PJ_VERSION "${proj_version}")

# This will break if 4.10.0 ever will be released (highly unlikely)
STRING(REGEX REPLACE "([0-9])([0-9])([0-9])" "\\1" PROJ_VERSION_MAJOR "${PJ_VERSION}")
STRING(REGEX REPLACE "([0-9])([0-9])([0-9])" "\\2" PROJ_VERSION_MINOR "${PJ_VERSION}")
STRING(REGEX REPLACE "([0-9])([0-9])([0-9])" "\\3" PROJ_VERSION_PATCH "${PJ_VERSION}")
STRING(CONCAT PROJ_VERSION_STR "(" ${PROJ_VERSION_MAJOR} "." ${PROJ_VERSION_MINOR} "." ${PROJ_VERSION_PATCH} ")")

# Minimum Proj version required is 4.9.3
IF ((PROJ_VERSION_MAJOR EQUAL 4) AND ((PROJ_VERSION_MINOR LESS 9) OR ((PROJ_VERSION_MINOR EQUAL 9) AND (PROJ_VERSION_PATCH LESS 3))))
MESSAGE(FATAL_ERROR "Found Proj: ${PROJ_VERSION_MAJOR}.${PROJ_VERSION_MINOR}.${PROJ_VERSION_PATCH}. Cannot build QGIS using Proj older than 4.9.3.")
ENDIF((PROJ_VERSION_MAJOR EQUAL 4) AND ((PROJ_VERSION_MINOR LESS 9) OR ((PROJ_VERSION_MINOR EQUAL 9) AND (PROJ_VERSION_PATCH LESS 3))))
ENDIF(EXISTS ${PROJ_INCLUDE_DIR}/proj.h)
IF (NOT PROJ_FIND_QUIETLY)
MESSAGE(STATUS "Found Proj: ${PROJ_LIBRARY} version ${PROJ_VERSION_MAJOR} ${PROJ_VERSION_STR}")
Expand Down
2 changes: 1 addition & 1 deletion doc/INSTALL.html
Expand Up @@ -205,7 +205,7 @@ <H1>2. Overview</H1>

<UL>
<LI>Qt &gt;= 5.9.0
<LI>Proj &gt;= 4.4.x
<LI>Proj &gt;= 4.9.3
<LI>GEOS &gt;= 3.4
<LI>Sqlite3 &gt;= 3.0.0
<LI>SpatiaLite &gt;= 4.2.0
Expand Down
2 changes: 1 addition & 1 deletion doc/overview.t2t
Expand Up @@ -17,7 +17,7 @@ Required build tools:
Required build dependencies:

- Qt >= 5.9.0
- Proj >= 4.4.x
- Proj >= 4.9.3
- GEOS >= 3.4
- Sqlite3 >= 3.0.0
- SpatiaLite >= 4.2.0
Expand Down

0 comments on commit 7e0181b

Please sign in to comment.