Hint when working on making frameworks build standalone...

Alexander Neundorf neundorf at kde.org
Sun May 13 18:22:50 UTC 2012


Hi,

one thing which I noticed was done in all directories in tier1/ and tier2/ was 
that CMAKE_MODULE_PATH was not reset, i.e. it was always appended, e.g. like 
this:

set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH} )

If it is done this way, you don't notice if you framework still drags in files 
from kdelibs/cmake/, which it must not do once it is a framework.
Everything it needs must come either from cmake, from e-c-m or from itself.

So, I changed this in all tier1/ (maybe except kcodecs) and tier2/ directories 
to use local stuff only:

set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake )

I hope I found all Find-modules which are used in those places, if I missed 
some, let me know.

E.g. for kauth I copied FindPolkitQt.cmake and FindPolkitQt-1.cmake from 
kdelibs/cmake/modules/ to tier2/kauth/cmake/, so it has everything it needs.

Another option would have been to add them directly to e-c-m, but I thought 
first copying them to the places where they are needed and adding them later 
on to e-c-m looks like an easier way t do it.

Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20120513/e66515f5/attachment.html>


More information about the Kde-frameworks-devel mailing list