Open skasperski opened 3 years ago
Hi @skasperski! Did you solve your issue? If not, you can try this instead:
find_package(libpointmatcher REQUIRED)
include_directories(${libpointmatcher_INCLUDE_DIRS})
add_library(pm_test test.cpp)
target_link_libraries(pm_test PUBLIC ${libpointmatcher_LIBRARIES})
This gives me:
CMake Error:
Error evaluating generator expression:
$<TARGET_FILE:pointmatcher>
No target "pointmatcher"
Have you tried to configure your project using a new build directory?
If it does not solve your issue, I would need to know which cmake's version you are using and what is the minimum version that is configured in your project's CMakeLists.txt file. Thanks!
Also, if you're on Ubuntu, give us the output of that script to simplify the process: https://github.com/ethz-asl/libpointmatcher/blob/master/utest/listVersionsUbuntu.sh
Sorry for late reply, somehow lost track of this.
I completely rebuild everything several times. My cmake version is 3.10.2 (default on Ubuntu 18.04). In my CMakeLists I have "cmake_minimum_required(VERSION 3.0)".
Output of the script above:
Name | Version
----------------|-------------------------------
ubuntu: | Description: Ubuntu 18.04.5 LTS
architecture: | 64-bit
gcc: | gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
git: | git version 2.17.1
cmake: | cmake version 3.10.2 CMake suite maintained and supported by Kitware (kitware.com/cmake).
boost: | Version: 1.65.1.0ubuntu1
eigen3: | Version: 3.3.4-4
doxygen: | Version: 1.8.13-10
I now also tried building this inside a catkin workspace, which gives me the same error.
Since a recent update my package using pointmatcher fails with a CMake error. I installed pointmatcher via normal "cmake + make install" and use it from my package like this:
However this fails with:
Trying to solve this I stumbled across multiple (and different) versions of pointmatcher's cmake-files in these 2 locations:
and
I assume this makes it undefined which version is actually used by CMake's find_package call.