Problem with cmake 2.8 and FindOpenSSl.cmake module shipped with kde
ctrlaltca
ctrlaltca at libero.it
Mon Dec 21 10:02:15 CET 2009
Hi, I'm a developer of KVIrc, a project that uses kde as an optional
component.
A fedora packager reported us a problem compiling kvirc with cmake 2.8
(https://svn.kvirc.de/kvirc/ticket/655); after a lot of investigation,
we found out that the problem was cmake being fooled in using both kde's
and cmake's bundled FindOpenSSL.cmake modules.
-- full explanation follows --
In out CMakeLists.txt, we call these FIND_PACKAGE:
FIND_PACKAGE(Qt4)
FIND_PACKAGE(KDE4)
FIND_PACKAGE(OpenSSL)
FindQt4 will check openssl's presence using cmake's bundled module,
while the others will use kde's module (kde's CMakeLists.txt enforces
the use of its internal modules).
Since kde's FindOpenSSL.cmake is based on cmake2.6 version and its
internals are changed in cmake 2.8, the mixed usage of the two modules
won't work (OPENSSL_LIBRARIES will be empty).
Our workaround has been placing FIND_PACKAGE(KDE4) before everything
else, forcing the use of kde's cmake modules everywhere.
-- end of full explanation --
An easy way to avoid such problems will be not to include in kde a
custom copy of FindOpenSSL.cmake since cmake already bundles a copy of
this module.
Is this solution practicable?
More information about the Kde-buildsystem
mailing list