[CMake] Cannot set CMP0022 to OLD

Stephen Kelly steveire at gmail.com
Sat Dec 14 08:58:23 EST 2013


Andreas Pakulat wrote:

> Anyway, I've now stripped it down as much as I can (without diving into
> the wilderness of FindKDE4Internal) and also added the observations I've
> made while stripping it. So its definetly somewhat related to the magics
> that the KDE4 module does.

It's related to the scope of the policy and the context of the macro, which 
is a bit counterintuitive.

Your options are:

1) 
Set the policy in KDE4Internal.cmake, like the rest of the policies.

2) 
Apply a patch equivalent to:

 diff --git a/CMakeLists.txt b/CMakeLists.txt
 index b93f190..134181c 100644
 --- a/CMakeLists.txt
 +++ b/CMakeLists.txt
 @@ -5,6 +5,7 @@ cmake_minimum_required(VERSION 2.8)
  project(KDevPlatform)
  cmake_policy(SET CMP0022 OLD)
  find_package(KDE4 4.7.0 REQUIRED)
 +include(KDE4Macros NO_POLICY_SCOPE)


Thanks,

Steve.





More information about the CMake mailing list