From ca02984dfd2ece229ecb5d2b9ebe9184b4c6ee40 Mon Sep 17 00:00:00 2001 From: vsr Date: Mon, 8 Jun 2020 12:10:44 +0300 Subject: [PATCH] Fix errors when using CMake older than 3.12 --- cmake/SalomeMacros.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/SalomeMacros.cmake b/cmake/SalomeMacros.cmake index 78ee462..33078a9 100644 --- a/cmake/SalomeMacros.cmake +++ b/cmake/SalomeMacros.cmake @@ -27,7 +27,9 @@ IF(WIN32) CMAKE_POLICY(SET CMP0020 OLD) # Disable automatic linking to qtmain.lib ENDIF(WIN32) CMAKE_POLICY(SET CMP0053 NEW) # For correct Qt 5 detection procedure -CMAKE_POLICY(SET CMP0074 NEW) # Use ROOT variables when detecting packages +IF(CMAKE_VERSION VERSION_GREATER_EQUAL 3.12) + CMAKE_POLICY(SET CMP0074 NEW) # Use ROOT variables when detecting packages +ENDIF() #---------------------------------------------------------------------------- # LIST_CONTAINS is a macro useful for determining whether a list has a -- 2.30.2