Skip to content

Commit

Permalink
[cmake] fix deprecated OLD policy for CMP0053
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids authored and nyalldawson committed Jun 7, 2018
1 parent d674a53 commit 088e94f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 20 deletions.
25 changes: 13 additions & 12 deletions CMakeLists.txt
@@ -1,11 +1,20 @@
#############################################################
# CMake settings
CMAKE_MINIMUM_REQUIRED(VERSION 3.1.0)
SET(CMAKE_COLOR_MAKEFILE ON)
# set path to additional CMake modules
SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
# POLICIES
CMAKE_POLICY (SET CMP0048 NEW)
CMAKE_POLICY (SET CMP0053 NEW)

#############################################################
# Project and version
SET(CPACK_PACKAGE_VERSION_MAJOR "3")
SET(CPACK_PACKAGE_VERSION_MINOR "1")
SET(CPACK_PACKAGE_VERSION_PATCH "0")
SET(COMPLETE_VERSION ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH})
SET(RELEASE_NAME "Master")
IF (POLICY CMP0048)
CMAKE_POLICY (SET CMP0048 NEW)
ENDIF (POLICY CMP0048)
PROJECT(qgis VERSION ${COMPLETE_VERSION})
IF (APPLE)
SET(QGIS_APP_NAME "QGIS")
Expand All @@ -17,16 +26,8 @@ ENDIF (APPLE)
MATH(EXPR QGIS_VERSION_INT "${CPACK_PACKAGE_VERSION_MAJOR}*10000+${CPACK_PACKAGE_VERSION_MINOR}*100+${CPACK_PACKAGE_VERSION_PATCH}")
MESSAGE(STATUS "QGIS version: ${COMPLETE_VERSION} ${RELEASE_NAME} (${QGIS_VERSION_INT})")

#############################################################
# CMake settings

CMAKE_MINIMUM_REQUIRED(VERSION 3.0.0)

SET(CMAKE_COLOR_MAKEFILE ON)

# set path to additional CMake modules
SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})

#############################################################
# Configure CCache if available
option(USE_CCACHE "Use ccache" ON)
if (USE_CCACHE)
Expand Down
5 changes: 1 addition & 4 deletions cmake/FindGDAL.cmake
Expand Up @@ -13,10 +13,7 @@
#
# GDAL_INCLUDE_DIR = where to find headers

IF (POLICY CMP0053) # in CMake 3.1.0+
CMAKE_POLICY (SET CMP0053 OLD) # keep old-style @VAR@ expansion
ENDIF (POLICY CMP0053)
INCLUDE (@CMAKE_SOURCE_DIR@/cmake/MacPlistMacros.cmake)
INCLUDE (${CMAKE_SOURCE_DIR}/cmake/MacPlistMacros.cmake)

IF(WIN32)

Expand Down
5 changes: 1 addition & 4 deletions cmake/FindGEOS.cmake
Expand Up @@ -13,10 +13,7 @@
# GEOS_LIBRARY
#

IF (POLICY CMP0053) # in CMake 3.1.0+
CMAKE_POLICY (SET CMP0053 OLD) # keep old-style @VAR@ expansion
ENDIF (POLICY CMP0053)
INCLUDE (@CMAKE_SOURCE_DIR@/cmake/MacPlistMacros.cmake)
INCLUDE (${CMAKE_SOURCE_DIR}/cmake/MacPlistMacros.cmake)

IF(WIN32)

Expand Down

0 comments on commit 088e94f

Please sign in to comment.