summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt14
1 files changed, 5 insertions, 9 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 94e38658697..0cd4028ac75 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -19,15 +19,11 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.7)
IF(POLICY CMP0022)
CMAKE_POLICY(SET CMP0022 NEW)
ENDIF()
-
-# We use the LOCATION target property (CMP0026)
-# and get_target_property() for non-existent targets (CMP0045)
-# and INSTALL_NAME_DIR (CMP0042)
-IF(CMAKE_VERSION VERSION_EQUAL "3.0.0" OR
- CMAKE_VERSION VERSION_GREATER "3.0.0")
- CMAKE_POLICY(SET CMP0026 OLD)
- CMAKE_POLICY(SET CMP0045 OLD)
- CMAKE_POLICY(SET CMP0042 OLD)
+IF(POLICY CMP0042)
+ CMAKE_POLICY(SET CMP0042 OLD)
+ENDIF()
+IF(POLICY CMP0045)
+ CMAKE_POLICY(SET CMP0045 OLD)
ENDIF()
IF(POLICY CMP0054)
CMAKE_POLICY(SET CMP0054 NEW)