norlab-ulaval / libnabo

A fast K Nearest Neighbor library for low-dimensional spaces
http://norlab-ulaval.github.io/libnabo/
BSD 3-Clause "New" or "Revised" License
431 stars 142 forks source link

Fix install-space include directories #106

Closed peci1 closed 3 years ago

peci1 commented 3 years ago

Fixes problem described in https://github.com/ethz-asl/libnabo/pull/103#issuecomment-694723471 .

ethzasl-jenkins commented 3 years ago

Can one of the admins verify this patch?

peci1 commented 3 years ago

The INSTALL_INTERFACE was specifying an empty string, which is IMO wrong, because it should point to the include directory.

With this fix, I get this libnabo-targets.cmake (excerpt):

# Create imported target libnabo::nabo
add_library(libnabo::nabo STATIC IMPORTED)

set_target_properties(libnabo::nabo PROPERTIES
  INTERFACE_INCLUDE_DIRECTORIES "/usr/include/eigen3;${_IMPORT_PREFIX}/include"
)

Without the fix, only the Eigen directories are there.

I'm using catkin tools to build the project, so maybe they set some directories differently than what you see...

jlblancoc commented 3 years ago

Ok, you are right of course! I only tested it with local builds without "make install"

:+1:

peci1 commented 3 years ago

Thanks ;)