marble and cmake_min_req

Stephen Kelly steveire at gmail.com
Sat Aug 1 13:49:07 UTC 2015


David Faure wrote:

> Please check kmix too:
> 
> 
> if(POLICY CMP0046)
>   cmake_policy (SET CMP0046 NEW)
> endif()
> 
> # Your project should require at least CMake 2.8.12 to use FindKF5.cmake
> if (KMIX_KF5_BUILD)
>    cmake_minimum_required(VERSION 2.8.12)
>    add_definitions( -DX_KMIX_KF5_BUILD )
>    add_definitions( -DTRANSLATION_DOMAIN=\"kmix\" )
> else ()
>    cmake_minimum_required(VERSION 2.8.11)
> endif()
> 
> if(POLICY CMP0046)
>   cmake_policy (SET CMP0046 NEW)
> endif()
> 

I think this is what's needed:

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 128d2ac..9106f1b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,3 @@
-project(kmix)
 
 # CMake build file for KMix. It supports both KDE4 and KF5.
 # 
@@ -10,10 +9,6 @@ project(kmix)
 #
 # Next step: Talk to Alex Fiestas how to progress
 
-if(POLICY CMP0046)
-  cmake_policy (SET CMP0046 NEW)
-endif()
-
 # Your project should require at least CMake 2.8.12 to use FindKF5.cmake
 if (KMIX_KF5_BUILD)
    cmake_minimum_required(VERSION 2.8.12)
@@ -27,6 +22,8 @@ if(POLICY CMP0046)
   cmake_policy (SET CMP0046 NEW)
 endif()
 
+project(kmix)
+
 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") 
 
 if (KMIX_KF5_BUILD)




More information about the Kde-buildsystem mailing list