-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathCMakeLists.txt
29 lines (24 loc) · 1.04 KB
/
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
27
28
29
cmake_minimum_required(VERSION 2.8.3)
project(bc_exploration)
set(CMAKE_BUILD_TYPE RELEASE)
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bc_exploration)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y -O3 -Wall -fpic")
# find current version of python 2.7
execute_process(
COMMAND "python2.7" -c "from distutils import sysconfig; print(sysconfig.get_python_inc())"
OUTPUT_VARIABLE PYTHON_INCLUDE_DIRS
OUTPUT_STRIP_TRAILING_WHITESPACE
)
include_directories(
${PYTHON_INCLUDE_DIRS}
"${PROJECT_SOURCE_DIR}/bc_exploration/cpp/inc/"
"${PROJECT_SOURCE_DIR}/deps/pybind11/include"
)
set(SOURCE_FILES
bc_exploration/cpp/src/exploration/astar.cpp
bc_exploration/cpp/src/exploration/collision.cpp
bc_exploration/cpp/src/exploration/util.cpp
)
add_library(exploration_cpp SHARED ${PROJECT_SOURCE_DIR} ${SOURCE_FILES} bc_exploration/cpp/src/exploration/python.cpp)
target_link_libraries(exploration_cpp ${PYTHON_LIBRARIES})
set_target_properties(exploration_cpp PROPERTIES SUFFIX ".so" PREFIX "_")