Bug 349925

Summary: Fail cmake chek if -DENABLE_KFILEMETADATASUPPORT=ON is not set
Product: [Applications] digikam Reporter: Gustavo Alvarez <sl1pkn07>
Component: Portability-CmakeAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles
Priority: NOR    
Version: 5.0.0   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In: 5.0.0

Description Gustavo Alvarez 2015-07-05 14:07:33 UTC
Hi

The build of the latest commit of digikam frameworks branch, fail if -DENABLE_KFILEMETADATASUPPORT=ON is not set

this is because the path of KF5:FileMetaData target (http://quickgit.kde.org/?p=digikam.git&a=blob&h=54ea892109720eb259c1f0f6f951b39e4df5ed88&hb=7ba11d3c599b283a81d7c1ca63ff11d26751f12d&f=CMakeLists.txt#l469) is always set, though the filemetadata support is has enabled or disabled (by default is disable)

Removing that line and adding it after, with selector like http://quickgit.kde.org/?p=digikam.git&a=blob&h=54ea892109720eb259c1f0f6f951b39e4df5ed88&hb=7ba11d3c599b283a81d7c1ca63ff11d26751f12d&f=CMakeLists.txt#l484 fixes the problem

then, if set -DENABLE_KFILEMETADATASUPPORT=ON, adds the target path in KF5_INCLUDES_ALL.  if set to OFF (or not set), then it will not add (by default not added)

Reproducible: Always

Steps to Reproduce:
1. download the last digikam frameworks branch commit with git
2. try to build without  -DENABLE_KFILEMETADATASUPPORT=ON


Actual Results:  
cmake configure finish with error

Expected Results:  
cmake configure finish ok

the patch:

http://sl1pkn07.wtf/paste/view/raw/2989952a

(the last part if because my kate eats the "useless" spaces)
Comment 1 caulier.gilles 2015-07-05 15:34:20 UTC
Git commit e583262b5175171df21739f57bcc2101f986b6b9 by Gilles Caulier.
Committed on 05/07/2015 at 15:32.
Pushed by cgilles into branch 'frameworks'.

fix broken compilation if ENABLE_KFILEMETADATASUPPORT flag is turned on.
FIXED-IN: 5.0.0

M  +13   -7    CMakeLists.txt
M  +2    -1    NEWS

http://commits.kde.org/digikam/e583262b5175171df21739f57bcc2101f986b6b9