Description
The v3.1.2 tarball fails to build since CMakeLists.txt refers to some components in the modules subdir which are not present.
CMake Error at CMakeLists.txt:36 (add_subdirectory):
add_subdirectory given source "modules/libssh2" which is not an existing
directory.
CMake Error at CMakeLists.txt:39 (add_subdirectory):
add_subdirectory given source "modules/openmesh" which is not an existing
directory.
CMake Error at CMakeLists.txt:42 (add_subdirectory):
add_subdirectory given source "modules/yaml-cpp" which is not an existing
directory.
CMake Error at CMakeLists.txt:48 (add_subdirectory):
add_subdirectory given source "modules/openbabel" which is not an ex
55E8
isting
directory.
I think there's a couple of different problems here. The secondary problem is that these directories are included in CMakeLists.txt but are not there in the source tarball, so cmake fails.
But the main problem is that these are external libraries: libssh2, openmesh, yaml-cpp, openbabel. Normally you'd want to build against the system version of these libraries. For instance on a Debian (Ubuntu) linux system they would be provided by the packages libssh2-1-dev, libopenmesh-dev, libyaml-cpp-dev, libopenbabel-dev.
Instead of including these libraries as source code in modules subdirs, CMakeLists.txt should use cmake methods to locate the required dependencies, i.e. use find_package
. The latter 3 libraries provide their own cmake config files for this.
ssh2 doesn't have cmake config files, but pkgconfig (pkg_search_module
) or find_library
can be used instead,