Skip to content

Commit

Permalink
[Backport release-3_22] Cleanup proj version detection (#46137)
Browse files Browse the repository at this point in the history
* Remove define from find logic

* define proj version

* Update qgsconfig.h.in

* Update qgscoordinatereferencesystem.h

* Remove unneeded include

Co-authored-by: Matthias Kuhn <matthias@opengis.ch>
Co-authored-by: Mathieu Pellerin <nirvn.asia@gmail.com>
  • Loading branch information
3 people committed Nov 20, 2021
1 parent 663dcf8 commit 58b0234
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 0 additions & 1 deletion cmake/FindProj.cmake
Expand Up @@ -86,7 +86,6 @@ IF (PROJ_FOUND)
ENDIF (NOT PROJ_FIND_QUIETLY)

INCLUDE_DIRECTORIES(BEFORE SYSTEM ${PROJ_INCLUDE_DIR})
ADD_DEFINITIONS(-DPROJ_VERSION_MAJOR=${PROJ_VERSION_MAJOR})

ELSE (PROJ_FOUND)

Expand Down
4 changes: 4 additions & 0 deletions cmake_templates/qgsconfig.h.in
Expand Up @@ -51,6 +51,10 @@
#define PYTHON_VERSION_MINOR "${Python_VERSION_MINOR}"
#define PYTHON_VERSION_PATCH "${Python_VERSION_PATCH}"

#define PROJ_VERSION_MAJOR ${PROJ_VERSION_MAJOR}
#define PROJ_VERSION_MINOR ${PROJ_VERSION_MINOR}
#define PROJ_VERSION_PATCH ${PROJ_VERSION_PATCH}

#cmakedefine USING_NMAKE

#cmakedefine USING_NINJA
Expand Down
1 change: 1 addition & 0 deletions src/core/proj/qgscoordinatereferencesystem.h
Expand Up @@ -32,6 +32,7 @@

//qgis includes
#include "qgis_sip.h"
#include "qgsconfig.h"
#include "qgsunittypes.h"
#include "qgsrectangle.h"
#include "qgssqliteutils.h"
Expand Down

0 comments on commit 58b0234

Please sign in to comment.