Bug 349208 - cmake can't find external libkvkontakte
Summary: cmake can't find external libkvkontakte
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Portability-Cmake (show other bugs)
Version: 4.11.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-15 22:00 UTC by Antonio Rojas
Modified: 2017-08-18 16:30 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.12.0


Attachments
patch for digikam-software-compilation.git (12.29 KB, patch)
2015-06-20 22:04 UTC, Alexander Potashev
Details
patch for digikam-software-compilation.git (version 2) (1.27 KB, patch)
2015-06-20 22:06 UTC, Alexander Potashev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Antonio Rojas 2015-06-15 22:00:36 UTC
Trying to build kipi-plugins 4.11.0 against external libkvkontakte 4.11.0 fails, because the FindLibKVkontakte.cmake file shipped by kipi-plugins overrides the one installed by the libkvkontakte package. The former tries to find libkvkontakte via pkgconfig, which fails since libkvkontakte-4.11.0 doesn't ship a .pc file.

Removing the FindLibKVkontakte.cmake shipped by kipi-plugins fixes it.

Reproducible: Always

Steps to Reproduce:
1. Install libkvkontakte 4.11
2. Try to build digikam SC 4.11

Actual Results:  
libkvkontakte is not found

Expected Results:  
libkvkontakte is found
Comment 1 Alexander Potashev 2015-06-15 23:28:08 UTC
This FindLibKVkontakte.cmake file comes from the Git repository "digikam-software-compilation". I would vote for deleting it unless I knew if this file is important for building the whole digiKam SC for Windows and Mac OS X.
Comment 2 caulier.gilles 2015-06-19 11:44:35 UTC
Alexander,

All digiKam SC cmake/modules  files are deleted with git/frameworks branch. With KF5 it was more easy to rewrite and simplify cmake script dedtection without to use .pc files, which are fully dropped everywhere from KDE libraries.

But i would not to change/rewrite cmake code in git/master. We have at least one or 2 release to do with digiKam for KDE4.

I suggestion to restore .pc from LibKVkontakte for KDE4 until end of KDE4 serie. After we can forget it as well... Like this i can continue to package this lib inside digiKAm in case of this lib is not available on target system. This is the case of Macports OSX and Emerge Windows.

Gilles

Gilles
Comment 3 Alexander Potashev 2015-06-20 18:23:09 UTC
Gilles,

How restoring of the .pc file is going to fix the problem reported here?
Comment 4 Alexander Potashev 2015-06-20 19:01:35 UTC
Antinio,

Please tell us how you are trying to build kipi-plugins after extracting digikam-4.11.0.tar.bz2. Are you running cmake against digikam-4.11.0/extra/kipi-plugins?
Comment 5 Antonio Rojas 2015-06-20 21:24:22 UTC
(In reply to Alexander Potashev from comment #4)
> Antinio,
> 
> Please tell us how you are trying to build kipi-plugins after extracting
> digikam-4.11.0.tar.bz2. Are you running cmake against
> digikam-4.11.0/extra/kipi-plugins?

No, on the top-level dir. See full cmake command here:
https://projects.archlinux.org/svntogit/packages.git/tree/trunk/PKGBUILD?h=packages/digikam
Comment 6 Alexander Potashev 2015-06-20 22:04:37 UTC
Created attachment 93268 [details]
patch for digikam-software-compilation.git

Gilles, (Antonio),

This patch should be enough to make everyone happy:
 - When DIGIKAMSC_COMPILE_LIBKVKONTAKTE is ON, we use the local LibKVkontakte.cmake,
 - When DIGIKAMSC_COMPILE_LIBKVKONTAKTE is OFF, we the local LibKVkontakte.cmake is not visible to CMake and then it looks for external installation of libkvkontakte.
Comment 7 Alexander Potashev 2015-06-20 22:06:52 UTC
Created attachment 93269 [details]
patch for digikam-software-compilation.git (version 2)

(Made it clear that the .cmake file was not modified, only moved.)
Comment 8 caulier.gilles 2015-06-20 22:09:41 UTC
Patch is fine for me. Let's go to apply it to git/master. Git/framework do not need it.

Gilles
Comment 9 Alexander Potashev 2015-06-21 05:31:28 UTC
Git commit 5d0328e90a282f652ca8488f5a81cecedd3fe3e1 by Alexander Potashev.
Committed on 21/06/2015 at 05:41.
Pushed by aspotashev into branch 'master'.

Fix build with external LibKVkontakte

Hide FindLibKVkontakte.cmake from CMake when compilation of internal
copy of libkvkontakte is disabled.

M  +1    -0    CMakeLists.txt
R  +0    -0    cmake/modules/digikamsc-compile-libkvkontakte/FindLibKVkontakte.cmake [from: cmake/modules/FindLibKVkontakte.cmake - 100% similarity]

http://commits.kde.org/scratch/mwiesweg/digikam-sc/5d0328e90a282f652ca8488f5a81cecedd3fe3e1