openssl cmake module

Alexander Neundorf neundorf at kde.org
Thu May 5 22:28:04 CEST 2011


On Wednesday 04 May 2011, matthias sweertvaegher wrote:
> hi Alex,
> thanks for your patience ;)
> 
> On Wed, May 4, 2011 at 9:50 PM, Alexander Neundorf <neundorf at kde.org> wrote:
> >> >>> I had a look, now I remember.
> >> >>> There is now quite a lot of stuff in it which I don't understand,
> >> >>> like those "eay" libraries and and the FindLibraryWithDebug file
> >> >>> which will probably break something on Windows if it is removed.
> >> >>> 
> >> >>> The FindOpenSSL.cmake from CMake 2.6.4, which we depend on, doesn't
> >> >>> look for the crypto library, so simply removing FindOpenSSL.cmake
> >> >>> from kdelibs would not help your problem with libcrypto.
> >> >>> 
> >> >>> Starting with cmake 2.8.0 FindOpenSSL.cmake checks for libcrypto.
> >> >>> It has also some handling for debug and release builds on Windows,
> >> >>> but I can't really comment on this, our Windows developers have to
> >> >>> check that.
> >> >>> 
> >> >>> So, we cannot simply remove the FindOpenSSL.cmake we have in
> >> >>> kdelibs. Either the one we have has to be updated to e.g. the one
> >> >>> from CMake 2.8.4 or 2.8.0, or a higher version of cmake needs to be
> >> >>> required by KDE. But I'd like to wait a bit with requiring a higher
> >> >>> cmake version. I'd like to see what comes out of the platform 11
> >> >>> meeting, maybe we'll need a higher cmake version afterwards, and I
> >> >>> wouldn't want to increase the required version twice.
> >> >>> 
> >> >>> So, can you pelase check that it works for you if you replace the
> >> >>> FindOpenSSL.cmake in kdelibs with the one from CMake 2.8.4 ?
> >> >> 
> >> >> Matthias, your turn to say you're still there :)
> >> > 
> >> > yes, I realize.. :) thanks for looking into the issue, Alex; and
> >> > thanks for reminding me Raphael ;)
> >> > 
> >> > I have briefly taken a look but I run into trouble when running cmake
> >> > (after upgrading my cmake from 2.8.1 to 2.8.4), so I need more time to
> >> > investigate. I report back to you next week with more info. I am still
> >> > on kde 4.4.4 here, so I might have to upgrade kde as well, i guess.
> >> > 
> >> > cheers
> >> > matthias
> >> 
> >> I have tested with the 2.8.4 version of FindOpenSSL.cmake and it
> >> works, but did you want me to downgrade to cmake 2.6.4 somehow? That
> > 
> > KDE requires CMake 2.6.4.
> > So, you replaced the FindOpenSSL.cmake in kdelibs/cmake/modules/ with the
> > one from CMake 2.8.4, right ?
> 
> yes (i'll add the command to avoid confusion):
> # cp /home/mattie/programs/cmake-2.8.4/Modules/FindOpenSSL.cmake
> /usr/share/kde4/apps/cmake/modules/FindOpenSSL.cmake
> 
> > Which version of CMake did you use ?
> > It must be tested with CMake 2.6.4.
> > You can get it simply from here:
> > http://www.cmake.org/files/v2.6/cmake-2.6.4-Linux-i386.tar.gz
> > unpack it e.g. into /opt/, and then use this cmake by calling it with its
> > full path on a fresh build tree.
> 
> ok, I downloaded the 2.6.4. when you invoke the right binary, it
> automatically uses the associated cmake environment? so I ran:
> ~/programs/cmake-2.6.4-Linux-i386/bin/cmake ../telemeter-plasmoid
> ==================================================================
> -- Found Qt-Version 4.6.3 (using /usr/bin/qmake)
> -- Found X11: /usr/lib64/libX11.so
> -- Phonon Version: 4.4.2
> -- Found KDE 4.4 include dir: /usr/include
> -- Found KDE 4.4 library dir: /usr/lib64
> -- Found the KDE4 kconfig_compiler preprocessor: /usr/bin/kconfig_compiler
> -- Found automoc4: /usr/bin/automoc4
> CMake Error at /usr/share/kde4/apps/cmake/modules/FindOpenSSL.cmake:116
> (include):
>   include could not find load file:
> 
>     /FindPackageHandleStandardArgs.cmake
> Call Stack (most recent call first):
>   CMakeLists.txt:5 (find_package)

No reason to panic, just check what's going on.
So, please have a look at that file, and there will probably be something 
like:
include(${CMAKE_CURRENT_LISTDIR}/FindPackageHandleStandardArgs.cmake)

This variable has been introduced in 2.8.2 I think, so it is empty in 2.6.4.

To make it work with cmake 2.6.4, it should work if you use something like 
get_filename_component( _my_dir  ${CMAKE_CURRENT_LIST_FILE} PATH)

include(${_my_dir}/FindPackageHandleStandardArgs.cmake)

This way it will get the FindPackageHandleStandardArgs.cmake from kdelibs, 
which already has the new features from cmake 2.8.2.

Alex


More information about the Kde-buildsystem mailing list