forked from cfo/nanoflann_catkin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
26 lines (20 loc) · 974 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
cmake_minimum_required(VERSION 2.8.3)
project(nanoflann_catkin)
find_package(catkin_simple REQUIRED)
catkin_simple()
include(ExternalProject)
file(MAKE_DIRECTORY ${CATKIN_DEVEL_PREFIX}/include)
ExternalProject_Add(nanoflann_src
#GIT_REPOSITORY https://github.com/cfo/nanoflann.git
GIT_REPOSITORY https://github.com/jlblancoc/nanoflann.git
UPDATE_COMMAND ""
CONFIGURE_COMMAND #cd ../nanoflann_src && cmake . -DCMAKE_CXX_FLAGS=-fPIC
BUILD_COMMAND #cd ../nanoflann_src && make -j8
INSTALL_COMMAND
mkdir -p ${CATKIN_DEVEL_PREFIX}/include/nanoflann/ &&
cp ../nanoflann_src/include/nanoflann.hpp ${CATKIN_DEVEL_PREFIX}/include/nanoflann/ &&
cp ../nanoflann_src/examples/KDTreeVectorOfVectorsAdaptor.h ${CATKIN_DEVEL_PREFIX}/include/nanoflann/ &&
sed -i s|nanoflann.hpp|nanoflann/nanoflann.hpp|g ${CATKIN_DEVEL_PREFIX}/include/nanoflann/KDTreeVectorOfVectorsAdaptor.h
)
cs_install()
cs_export(INCLUDE_DIRS ${CATKIN_DEVEL_PREFIX}/include)