Fix build with newer libssh and cmake

Tomaz Canabrava tcanabrava at kde.org
Sun Jun 28 15:16:29 PDT 2015


Dirk,

Sorry for the broken patch earlier.
This patch checks if the libssh is > 1.6.0 and applyes the new cmake way of
finding libraries on it.

I need this to compile with libssh from git/master on Mac currently.


On Sun, Jun 28, 2015 at 2:35 PM, Tomaz Canabrava <tcanabrava at kde.org> wrote:

> Sorry, it unbreak things for me and breaks for others. I'll redo this
>
> On Sun, Jun 28, 2015, 14:04 Dirk Hohndel <dirk at hohndel.org> wrote:
>
>> On Sun, Jun 28, 2015 at 10:00:51AM -0700, Dirk Hohndel wrote:
>> > On Sun, Jun 28, 2015 at 01:59:29PM -0300, Tomaz Canabrava wrote:
>> > > libssh just changed the way it deals with CMakeFiles and I tougth
>> poor dirk
>> > > had broken the build, tsc.
>> >
>> > Does this break builds with older libssh?
>>
>> Well, of course it does:
>>
>> make
>> -- out of source build from source in /home/hohndel/subsurface
>> -- Configuring done
>> CMake Warning (dev) at CMakeLists.txt:480 (add_executable):
>> Policy CMP0028 is not set: Double colon in target name means ALIAS or
>> IMPORTED target.  Run "cmake --help-policy CMP0028" for policy details.
>> Use the cmake_policy command to set the policy and suppress this warning.
>>
>> Target "TestGpsCoords" links to target "Libssh2::libssh2" but the target
>> was not found.  Perhaps a find_package() call is missing for an IMPORTED
>> target, or an ALIAS target is missing?
>> Call Stack (most recent call first): CMakeLists.txt:493 (TEST)
>> This warning is for project developers.  Use -Wno-dev to suppress it.
>>
>> and then later
>>
>> Linking CXX executable subsurface
>> /usr/bin/ld: cannot find -lLibssh2::libssh2
>> collect2: error: ld returned 1 exit status
>> CMakeFiles/subsurface.dir/build.make:288: recipe for target 'subsurface'
>> failed
>>
>> So maybe this needs a little more work, Tomaz?
>>
>> /D
>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150628/60157c5d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-build-with-libssh-from-git.patch
Type: application/octet-stream
Size: 870 bytes
Desc: not available
URL: <http://lists.subsurface-divelog.org/pipermail/subsurface/attachments/20150628/60157c5d/attachment.obj>


More information about the subsurface mailing list