CMakeLists.txt 1018 B

12345678910111213141516171819202122232425262728293031
  1. find_package(Eigen3 QUIET) # optional, for examples only
  2. # examples:
  3. macro(DefineExample _NAME)
  4. add_executable(${_NAME} ${_NAME}.cpp)
  5. set_target_properties(${_NAME} PROPERTIES FOLDER "Examples")
  6. target_link_libraries(${_NAME} nanoflann::nanoflann) # adds the "#include" directory.
  7. endmacro()
  8. DefineExample(dynamic_pointcloud_example)
  9. DefineExample(pointcloud_example)
  10. DefineExample(pointcloud_kdd_radius)
  11. DefineExample(pointcloud_adaptor_example)
  12. DefineExample(pointcloud_custom_metric)
  13. DefineExample(pointcloud_custom_resultset)
  14. DefineExample(SO3_adaptor_example)
  15. DefineExample(SO2_adaptor_example)
  16. DefineExample(saveload_example)
  17. DefineExample(vector_of_vectors_example)
  18. if(EIGEN3_FOUND)
  19. DefineExample(matrix_example)
  20. target_include_directories (matrix_example PRIVATE ${EIGEN3_INCLUDE_DIR})
  21. endif()
  22. # optional for gui examples:
  23. find_package(mrpt-gui QUIET)
  24. if (mrpt-gui_FOUND)
  25. add_subdirectory(examples_gui/nanoflann_gui_example_R3)
  26. add_subdirectory(examples_gui/nanoflann_gui_example_bearings)
  27. endif()