diff -Nrup a/cmake/Modules/FindPROJ.cmake b/cmake/Modules/FindPROJ.cmake --- a/cmake/Modules/FindPROJ.cmake 1970-01-01 01:00:00.000000000 +0100 +++ b/cmake/Modules/FindPROJ.cmake 2021-05-26 06:16:20.590025388 +0200 @@ -0,0 +1,91 @@ +# - Try to find PROJ +# Once done this will define +# +# PROJ_FOUND - system has PROJ +# PROJ_INCLUDE_DIRS - the PROJ include directory +# PROJ_LIBRARIES - Link these to use PROJ +# PROJ_DEFINITIONS - Compiler switches required for using PROJ +# +# Copyright (c) 2009 Andreas Schneider <mail@cynapses.org> +# +# Redistribution and use is allowed according to the terms of the New +# BSD license. +# For details see the accompanying COPYING-CMAKE-SCRIPTS file. +# + + +if (PROJ_LIBRARIES AND PROJ_INCLUDE_DIRS) + # in cache already + set(PROJ_FOUND TRUE) +else (PROJ_LIBRARIES AND PROJ_INCLUDE_DIRS) + + find_path(PROJ_INCLUDE_DIR + NAMES + proj_api.h + PATHS +if(WIN32) + ${PROJ_DEV_PATH}/include +endif(WIN32) + /usr/include + /usr/local/include + /opt/local/include + /sw/include + ${CMAKE_INSTALL_PREFIX}/include + ${CMAKE_SOURCE_DIR}/Win32/GDAL/include + PATH_SUFFIXES + proj + + ) + mark_as_advanced(PROJ_INCLUDE_DIR) + + find_library(LIBPROJ_LIBRARY + NAMES + proj + proj_i + PATHS +if(WIN32) + ${PROJ_DEV_PATH}/lib +endif(WIN32) + /usr/lib + /usr/local/lib + /opt/local/lib + /sw/lib + ${CMAKE_INSTALL_PREFIX}/lib + ${CMAKE_SOURCE_DIR}/Win32/GDAL/lib + ) + mark_as_advanced(LIBPROJ_LIBRARY) + + if (LIBPROJ_LIBRARY) + set(LIBPROJ_FOUND TRUE) + endif (LIBPROJ_LIBRARY) + + set(PROJ_INCLUDE_DIRS + ${PROJ_INCLUDE_DIR} + ) + + if (LIBPROJ_FOUND) + set(PROJ_LIBRARIES + ${PROJ_LIBRARIES} + ${LIBPROJ_LIBRARY} + ) + endif (LIBPROJ_FOUND) + + if (PROJ_INCLUDE_DIRS AND PROJ_LIBRARIES) + set(PROJ_FOUND TRUE) + endif (PROJ_INCLUDE_DIRS AND PROJ_LIBRARIES) + + if (PROJ_FOUND) + if (NOT PROJ_FIND_QUIETLY) + message(STATUS "Found PROJ: ${PROJ_LIBRARIES}") + endif (NOT PROJ_FIND_QUIETLY) + else (PROJ_FOUND) + if (PROJ_FIND_REQUIRED) + message(FATAL_ERROR "Could not find PROJ") + endif (PROJ_FIND_REQUIRED) + endif (PROJ_FOUND) + + # show the PROJ_INCLUDE_DIRS and PROJ_LIBRARIES variables only in the advanced view + mark_as_advanced(PROJ_INCLUDE_DIRS PROJ_LIBRARIES) + +endif (PROJ_LIBRARIES AND PROJ_INCLUDE_DIRS) + diff -Nrup a/CMakeLists.txt b/CMakeLists.txt --- a/CMakeLists.txt 2021-05-24 11:18:08.000000000 +0200 +++ b/CMakeLists.txt 2021-05-26 06:14:07.845073934 +0200 @@ -151,7 +151,7 @@ find_package(Qt5WebEngineWidgets REQU find_package(Qt5Qml REQUIRED) find_package(Qt5Help REQUIRED) find_package(GDAL REQUIRED) -find_package(PROJ REQUIRED) +find_package(PROJ REQUIRED) find_package(JPEG REQUIRED) find_package(ROUTINO REQUIRED) find_package(QuaZip-Qt5 REQUIRED) @@ -162,9 +162,9 @@ if(${Qt5Widgets_VERSION} VERSION_LESS 5. message( SEND_ERROR "You need at least Qt5.8 or newer.") endif() -if(${PROJ_VERSION} VERSION_LESS 7.2.1) - message( SEND_ERROR "You need at least PROJ 7.2.1 or newer.") -endif() +#if(${PROJ_VERSION} VERSION_LESS 7.2.1) +# message( SEND_ERROR "You need at least PROJ 7.2.1 or newer.") +#endif() if(USE_QT5DBus) find_package(Qt5DBus REQUIRED)