8000 build fails: CMakeLists.txt from source tarball tries to add missing modules · Issue #9 · nutjunkie/IQmol3 · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
build fails: CMakeLists.txt from source tarball tries to add missing modules #9
Open
@drew-parsons

Description

@drew-parsons

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,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0