www.libssh2.org | Daily snapshots | Mailing list archive | Docs | Examples | github

Archive Index This month's Index

Subject: Re: CMake

Re: CMake

From: Kamil Dudka <kdudka_at_redhat.com>
Date: Mon, 08 Dec 2014 14:45:33 +0100

On Saturday 06 December 2014 00:34:41 Alexander Lamaison wrote:
> You may recall that back in March I promised to convert the libssh2
> build system to CMake 'soon'. Well, 9 months later, it is more or
> less complete: https://github.com/alamaison/libssh2/tree/cmake. I
> would greatly appreciate your feedback and help with testing on the
> platforms that matter to you.
>
> The goal is to match or exceed every relevant feature of the autotools
> system like-for-like, so, unless otherwise stated in this email,
> assume that any missing functionality is a bug. Please report it.
>
> CMake, however, is fundamentally different from autotools, so some
> features (for example, building source distributions, aka `make dist`)
> aren't relevant anymore and aren't specifically catered for. The
> README should get you started but, if you need help getting accustomed
> to CMake, I'm very happy to answer any questions you have.
>
> tl;dr
> - A version of libssh2 using CMake is available at
> https://github.com/alamaison/libssh2/tree/cmake
> - Please test

Thank you for working on this!

I got libssh2 successfully built for Fedora using CMake and your patchset:

http://pkgs.fedoraproject.org/cgit/libssh2.git/commit/?id=213e752a
http://koji.fedoraproject.org/koji/taskinfo?taskID=8321846

I have encountered a few minor issues:

- The shared library is no longer versioned as it used to be. I have
hard-coded the version into src/CMakeLists.txt for now:

--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -186,7 +186,9 @@ endif()

 add_library(libssh2 ${SOURCES})
 # we want it to be called libssh2 on all platforms
-set_target_properties(libssh2 PROPERTIES PREFIX "")
+set_target_properties(libssh2 PROPERTIES PREFIX ""
+ SOVERSION 1
+ VERSION 1.0.1)

 target_compile_definitions(libssh2 PRIVATE ${PRIVATE_COMPILE_DEFINITIONS})
 target_include_directories(libssh2

- The file libssh2.pc is no longer generated with CMake. Is there any plan
to restore this functionality?

- Man pages are not installed by CMake.

- Before it goes to master, it would be good to merge some commits to make
the history easier to follow. Namely the unnecessary renames of libssh2.h
to libssh2.h.in and vice versa make the patchset difficult to apply on the
latest upstream release.

Kamil
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2014-12-08

the libssh2 team