We require a min version 3.1 since the cmake config files in 3.0 are totally broken. In 3.1 they are still not completely right, they miss a dependency on boost in order to define the Boost::system target so we add a find_package call here.
Diff Detail
- Repository
- R326 Kalzium
- Lint
Lint Skipped - Unit
Unit Tests Skipped
Upstream is working on fixing the remaining cmake issues and they will release a 3.1.1 that will allow to simplify the patch
Removed boost dependency, no longer needed in 3.1.1. Unfortunately we can't bump the min version since they forgot to bump the version before release.
I tried using this patch to build Kalzium on Debian but got some errors:
Maybe the OpenBabel CMake files are still causing trouble?What's the full path of OpenBabel3Config.cmake and its second line ("get_filename_component") on Debian?
What's the full path of OpenBabel3Config.cmake and its second line ("get_filename_component") on Debian?
I was so focused on the linker errors I overlooked that. It's installed at /usr/lib/x86_64-linux-gnu/cmake/openbabel3/OpenBabel3Config.cmake. Here is its full content (on the second/third lines that's actually a hard line break, not a wrap).
# The OpenBabel3 config file. To get the targets include the exports file. get_filename_component(OpenBabel3_INSTALL_PREFIX "${OpenBabel3_DIR}/../../.." ABSOLUTE) set(OpenBabel3_VERSION_MAJOR "3") set(OpenBabel3_VERSION_MINOR "1") set(OpenBabel3_VERSION_PATCH "0") set(OpenBabel3_VERSION "3.1.0") set(OpenBabel3_INCLUDE_DIRS "${OpenBabel3_INSTALL_PREFIX}/include/openbabel3") set(OpenBabel3_LIBRARIES "$<TARGET_FILE:openbabel>") set(OpenBabel3_EXPORTS_FILE "${OpenBabel3_INSTALL_PREFIX}/lib/cmake/openbabel3/OpenBabel3_EXPORTS.cmake") set(OpenBabel3_ENABLE_VERSIONED_FORMATS "ON") # Include the exports file to import the exported OpenBabel targets include("${OpenBabel3_EXPORTS_FILE}")
The linker errors are caused by this (the pthread::pthread target is added in OpenBabel3_EXPORTS.cmake, which is failing to get imported for you)
This comes from the hardcoded REL_REF defined in https://github.com/openbabel/openbabel/blob/openbabel-3-1-1/CMakeLists.txt#L761 which is wrong for Debian (doesn't account for the extra /x86_64-linux-gnu/ subdir). Hardcoding this doesn't look right to me, you should ask them to fix this