mirror of
https://github.com/weechat/weechat.git
synced 2026-06-25 04:16:38 +02:00
cmake: remove implicitly enabled cmake policy handling
Whenever cmake_minimum_required() is used, all the policies available in the specified version are toggled to NEW. Thus we no longer need to manually change them. The highest policy - CMP0017 - has been around circa cmake 2.8.4, while we require 3.x. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
This commit is contained in:
committed by
Sébastien Helleu
parent
2a234b3bfe
commit
71ef7e286c
+1
-18
@@ -52,16 +52,8 @@ else()
|
||||
set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}")
|
||||
endif()
|
||||
|
||||
# license
|
||||
set(LICENSE "GPL3")
|
||||
|
||||
# add definitions for version and license
|
||||
if(COMMAND cmake_policy)
|
||||
cmake_policy(SET CMP0005 NEW)
|
||||
add_definitions(-DWEECHAT_VERSION="${VERSION}" -DWEECHAT_LICENSE="${LICENSE}")
|
||||
else()
|
||||
add_definitions(-DWEECHAT_VERSION='"${VERSION}"' -DWEECHAT_LICENSE='"${LICENSE}"')
|
||||
endif()
|
||||
add_definitions(-DWEECHAT_VERSION="${VERSION}" -DWEECHAT_LICENSE="GPL3")
|
||||
|
||||
# package string
|
||||
set(PKG_STRING "${PROJECT_NAME} ${VERSION}")
|
||||
@@ -192,15 +184,6 @@ set(WEECHAT_HOME "${WEECHAT_HOME}" CACHE
|
||||
FORCE)
|
||||
mark_as_advanced(CLEAR WEECHAT_HOME)
|
||||
|
||||
if(COMMAND cmake_policy)
|
||||
if(POLICY CMP0003)
|
||||
cmake_policy(SET CMP0003 NEW)
|
||||
endif()
|
||||
if(POLICY CMP0017)
|
||||
cmake_policy(SET CMP0017 NEW)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_definitions(-DHAVE_CONFIG_H)
|
||||
|
||||
include(FindPkgConfig)
|
||||
|
||||
Reference in New Issue
Block a user