Skip to content

Commit

Permalink
install lvr-specific Find*.cmake for external modules
Browse files Browse the repository at this point in the history
Nabo and STANN don't have official Find scripts.
FindEigen3.cmake is part of cmake 3.*, but lvr still supports 2.8.
  • Loading branch information
Michael Görner committed Nov 13, 2015
1 parent e70a165 commit 787b6f7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,12 @@ configure_file(lvrConfig.cmake.in ${CMAKE_BINARY_DIR}/lvrConfig.cmake @ONLY)
install(FILES ${CMAKE_BINARY_DIR}/lvrConfig.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/lvr)

install(FILES
CMakeModules/FindEigen3.cmake
CMakeModules/FindNabo.cmake
CMakeModules/FindSTANN.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/lvr/Modules)

################################################################
# DOCUMENTATION
################################################################
Expand Down
9 changes: 7 additions & 2 deletions lvrConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
# -----------------------------------------------------------------
include("${CMAKE_CURRENT_LIST_DIR}/lvrTargets.cmake")

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/Modules")

cmake_policy(PUSH)
cmake_policy(SET CMP0012 NEW)

Expand All @@ -32,7 +34,8 @@ list(APPEND lvr_DEFINITIONS ${VTK_DEFINTIONS})

# nabo
if(@NABO_FOUND@)
list(APPEND lvr_INCLUDE_DIRS @NABO_INCLUDE_DIRS@)
find_package(Nabo REQUIRED)
list(APPEND lvr_INCLUDE_DIRS ${NABO_INCLUDE_DIRS})
endif()

# pcl
Expand Down Expand Up @@ -67,7 +70,9 @@ endif()

# stann
if(@STANN_FOUND@)
list(APPEND lvr_INCLUDE_DIRS @STANN_INCLUDE_DIR@)
set(STANN_DIR @STANN_DIR@)
find_package(STANN REQUIRED)
list(APPEND lvr_INCLUDE_DIRS ${STANN_INCLUDE_DIR})
endif()

cmake_policy(POP)
Expand Down

0 comments on commit 787b6f7

Please sign in to comment.