mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
Fix CMake policy warnings/changes introduced in 3.0.0 and higher
This commit is contained in:
parent
247c3dd0e7
commit
a4aaff5d53
@ -3,6 +3,9 @@ SET(CPACK_PACKAGE_VERSION_MINOR "7")
|
||||
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) # in CMake 3.0.0+
|
||||
CMAKE_POLICY (SET CMP0048 OLD) # keep PROJECT() from clearing VERSION variables
|
||||
ENDIF (POLICY CMP0048)
|
||||
SET(PROJECT_VERSION ${COMPLETE_VERSION})
|
||||
PROJECT(qgis${PROJECT_VERSION})
|
||||
IF (APPLE)
|
||||
@ -459,6 +462,9 @@ IF (WIN32)
|
||||
ELSE (WIN32)
|
||||
|
||||
IF (APPLE)
|
||||
IF (POLICY CMP0042) # in CMake 3.0.0+
|
||||
SET (CMAKE_MACOSX_RPATH OFF) # otherwise ON by default
|
||||
ENDIF (POLICY CMP0042)
|
||||
# for Mac OS X, everything is put inside an application bundle
|
||||
# save the root install prefix for the app later
|
||||
SET (QGIS_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
|
||||
|
@ -13,7 +13,9 @@
|
||||
#
|
||||
# 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)
|
||||
|
||||
IF(WIN32)
|
||||
|
@ -13,6 +13,9 @@
|
||||
# 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)
|
||||
|
||||
IF(WIN32)
|
||||
|
@ -32,7 +32,7 @@ ADD_CUSTOM_TARGET (translations ALL
|
||||
DEPENDS ${QM_FILES})
|
||||
|
||||
# first compile sources, then compile translations
|
||||
ADD_DEPENDENCIES (translations qgis)
|
||||
ADD_DEPENDENCIES (translations ${QGIS_APP_NAME})
|
||||
|
||||
INSTALL (FILES ${QM_FILES}
|
||||
DESTINATION ${QGIS_DATA_DIR}/i18n)
|
||||
|
@ -42,6 +42,12 @@ ADD_CUSTOM_TARGET(clean-staged-plugins
|
||||
COMMAND ${CMAKE_COMMAND} -E remove_directory "${PYTHON_OUTPUT_DIRECTORY}/plugins"
|
||||
)
|
||||
|
||||
IF(POLICY CMP0040) # in CMake 3.0.0+
|
||||
# Skip 'TARGET signature of add_custom_command() must exist' warning, triggered by macro expansion
|
||||
CMAKE_POLICY (PUSH) # see POP below (NOTE: must wrap related macros, which record policies)
|
||||
CMAKE_POLICY (SET CMP0040 OLD) # temporary policy for staging/py_compile macros
|
||||
ENDIF(POLICY CMP0040)
|
||||
|
||||
# Macro to byte-compile a target's staged Python resource(s)
|
||||
MACRO(PY_COMPILE TARGET_NAME RESOURCE_PATHS)
|
||||
IF(WITH_PY_COMPILE)
|
||||
@ -60,6 +66,10 @@ ADD_SUBDIRECTORY(console)
|
||||
ADD_SUBDIRECTORY(pyplugin_installer)
|
||||
ADD_SUBDIRECTORY(ext-libs)
|
||||
|
||||
IF(POLICY CMP0040)
|
||||
CMAKE_POLICY (POP) # see PUSH above
|
||||
ENDIF(POLICY CMP0040)
|
||||
|
||||
INCLUDE_DIRECTORIES(
|
||||
${PYTHON_INCLUDE_PATH}
|
||||
${SIP_INCLUDE_DIR}
|
||||
|
Loading…
x
Reference in New Issue
Block a user