Bug 378932 - kaccounts_add_services depends on intltools
Summary: kaccounts_add_services depends on intltools
Status: RESOLVED FIXED
Alias: None
Product: KAccounts
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: git-latest
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Telepathy Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-04-18 19:51 UTC by Olivier Churlaud
Modified: 2017-07-06 21:28 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Churlaud 2017-04-18 19:51:22 UTC
To build a library using the cmake macro kaccounts_add_service, one needs to first install intltools. 

It should be installed as a dependency of kaccounts-integration, or tell the user that it's needed instead of failing silently.
Comment 1 Elvis Angelaccio 2017-06-06 10:10:26 UTC
I was recently hit by this with kio-gdrive.
The problem is that intltools is a build-time only dependency, kaccounts-integration is perfectly functional without intltools installed at runtime.

So the only solution is that every project that uses kaccounts_add_service adds a find_package(Intltools) call (which is annoying because intltool is not cmake-friendly, you need to add a FindIntltool.cmake in your project).
Comment 2 Antonio Rojas 2017-06-06 10:40:22 UTC
A simple error message if the intltool-merge command isn't found would help a lot. kio-gdrive was the second time (after purpose) that I had to go digging into the source code to figure out why the build was failing.
Comment 3 Elvis Angelaccio 2017-06-06 10:53:23 UTC
Yeah we can probably do that.
Comment 4 Elvis Angelaccio 2017-06-06 11:15:51 UTC
https://phabricator.kde.org/D6114
Comment 5 Elvis Angelaccio 2017-07-06 21:28:48 UTC
Git commit 3b3842d1576076de8652b9d2744e6785014bbc5a by Elvis Angelaccio.
Committed on 06/07/2017 at 21:23.
Pushed by elvisangelaccio into branch 'Applications/17.04'.

Add error message if intltool-merge is not found

Users of the kaccounts_add_* macros are supposed to do a
find_package(Intltool REQUIRED), but if they don't the build fails with
a rather obscure message (`make install` fails because the service or
provider file was not generated).

This error message will at least make the life of packagers a bit
easier.

Differential Revision: https://phabricator.kde.org/D6114

M  +8    -0    src/lib/KAccountsMacros.cmake

https://commits.kde.org/kaccounts-integration/3b3842d1576076de8652b9d2744e6785014bbc5a