Open nh2 opened 4 years ago
Could you please try again with a newer version of Meson (0.58.0)? I am unable to reproduce this bug with Ceres 2.0.0:
Guessed CMake target 'Ceres::ceres'
CMake TARGET:
-- name: Ceres::ceres
-- type: SHARED
-- imported: True
-- properties: {
'INTERFACE_COMPILE_FEATURES': ['cxx_std_14']
'INTERFACE_INCLUDE_DIRECTORIES': ['/usr/include']
'INTERFACE_LINK_LIBRARIES': ['Threads::Threads', 'glog::glog', 'gflags', 'Eigen3::Eigen']
'IMPORTED_CONFIGURATIONS': ['RELEASE']
'IMPORTED_LOCATION_RELEASE': ['/usr/lib/libceres.so.2.0.0']
'IMPORTED_SONAME_RELEASE': ['libceres.so.2']
}
-- tline: CMake TRACE: /usr/lib64/cmake/Ceres/CeresTargets.cmake:63 add_library(['Ceres::ceres', 'SHARED', 'IMPORTED'])
[
{
"name": "Ceres",
"version": "2.0.0",
"compile_args": [
"-DGFLAGS_IS_A_DLL=0",
"-I/usr/include",
"-I/usr/include/eigen3"
],
"link_args": [
"-lpthread",
"/usr/lib/libceres.so.2.0.0",
"/usr/lib/libgflags.so.2.2.2",
"/usr/lib/libglog.so.0.5.0"
]
}
]
Also, if the include dirs are only stored in PACKAGE_INCLUDE_DIRS
, then I would argue that the CMake files are broken since this is a very non-standard variable to store them in. Even more so if they are not present in the imported target definitions...
Describe the bug
When I use ceres-solver 1.13, which is detected via Meson's CMake integration, like this:
and use
ceres_dep
in my project dependencies,-I
flags do not get added as expected.build/meson-info/intro-dependencies.json
shows:and
compile_args
, where the-I
include flags usually are, is empty.However, if I log them manually with
then they get printed as expected.
Relevant log output in
build/meson-logs/meson-log.txt
:It determines
Libraries:
correctly, but setsInclude Dirs
to[]
.The output
Guessed CMake target 'ceres'
suggests that we're in this branch:https://github.com/mesonbuild/meson/blob/76ae8658645c3e697bdf95777bbd36df7c1dd622/mesonbuild/dependencies/base.py#L1340-L1349
system parameters
meson --version
?0.53.1