Skip to content

Commit

Permalink
Fix CMake dependencies for Riegl RDB Plugin (#2219)
Browse files Browse the repository at this point in the history
* Remove explicit include directory setting

The linked target `rdbcpp` already sets `target_include_directories`.
CMake propagates these directories, so no use adding them again.

* Link to PDAL provided Eigen vendor library

The previously used CMake variable `EIGEN_INCLUDE_DIRS` was empty
when no Eigen library was installed. Since PDAL base lib is built
with `vendor/eigen` in any case, using the very same Eigen library
should be the safest option for a PDAL plugin.

* Add include directory for JSONCPP library

When JSONCPP is not installed ie. the include files are in a common
directory that is searched for library includes anyway, explicitly
setting the include directory is required.
  • Loading branch information
norbertwenzel authored and abellgithub committed Oct 10, 2018
1 parent 32bb076 commit 6b40cb8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions plugins/rdb/CMakeLists.txt
Expand Up @@ -13,8 +13,8 @@ PDAL_ADD_PLUGIN(libname reader rdb
${PDAL_JSONCPP_LIB_NAME}
rdbcpp)

target_include_directories(${libname} PUBLIC ${RDB_INCLUDE_CPP_DIR})
target_include_directories(${libname} PUBLIC ${EIGEN_INCLUDE_DIRS})
target_include_directories(${libname} PUBLIC "${PDAL_VENDOR_DIR}/eigen")
target_include_directories(${libname} PRIVATE ${PDAL_JSONCPP_INCLUDE_DIR})



Expand All @@ -29,7 +29,6 @@ if (BUILD_RDBLIB_TESTS)
PDAL_ADD_TEST(${RDB_TEST_NAME}
FILES test/RdbReaderTest.cpp
LINK_WITH ${libname})
target_include_directories(${RDB_TEST_NAME} PUBLIC ${RDB_INCLUDE_CPP_DIR})
target_include_directories(${RDB_TEST_NAME} PRIVATE
${PROJECT_BINARY_DIR}/plugins/rdb/test
${PROJECT_SOURCE_DIR}/plugins/rdb/io)
Expand Down

0 comments on commit 6b40cb8

Please sign in to comment.