[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Building as a subproject with CMake add_subdirectory


Hi,

I’m using libssh in my personal project which also uses the CMake build system. The most convenient way for me to build libssh from source (with custom OS X specific options set) is to use the add_subdirectory CMake command.

The issue is, the libssh CMakeLists.txt files use some variables like CMAKE_SOURCE_DIR which points to the root project, instead of CMAKE_CURRENT_SOURCE_DIR which point to the directory you really want.

I’ve made the few changes required to get this to work. I’d like to contribute this to the project for my own and other’s convenience. I’ve attached a diff to this email, or you can pull the commit from my Github repo https://github.com/DouglasHeriot/libssh/commit/6a055ec6d872b819748f29412f8642be33099389

As this is my first time contributing, I have emailed the Developer’s Certificate of Origin to contributing@xxxxxxxxxx


Regards,
Douglas


Attachment: libssh-cmake-subproject.diff
Description: Binary data



Follow-Ups:
Re: Building as a subproject with CMake add_subdirectoryAris Adamantiadis <aris@xxxxxxxxxxxx>
Re: Building as a subproject with CMake add_subdirectoryAndreas Schneider <asn@xxxxxxxxxxxxxx>
Archive administrator: postmaster@lists.cynapses.org