-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathCMakeLists.txt
111 lines (81 loc) · 2.82 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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
cmake_minimum_required(VERSION 3.8)
message("@@@@@@@@@@@@@@ GPUmodel cmake list @@@@@@@@@@@@@@")
set(CUDA_SDK_ROOT_DIR "/usr/local/cuda/samples")
project(hyp_despot CXX CUDA)
if(NOT DEFINED CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True)
endif()
if(NOT DEFINED CMAKE_CUDA_STANDARD)
set(CMAKE_CUDA_STANDARD 11)
set(CMAKE_CUDA_STANDARD_REQUIRED True)
endif()
set(BINARY_INSTALL_PATH "bin" CACHE PATH "Binary install path")
set(LIBRARY_INSTALL_PATH "lib" CACHE PATH "Library install path")
set(INCLUDE_INSTALL_PATH "include" CACHE PATH "Include install path")
set(CONFIG_INSTALL_PATH "${LIBRARY_INSTALL_PATH}/GPUmodel/cmake")
set(DESPOT_BUILD_EXAMPLES ON CACHE BOOL "Build C++ model examples")
set(DESPOT_BUILD_POMDPX ON CACHE BOOL "Build POMDPX example")
set(DESPOT_BUILD_GPUS ON CACHE BOOL "Build GPU despot")
set(CMAKE_PREFIX_PATH "/opt/ros/melodic")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -msse2 -mfpmath=sse")
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -arch=sm_30")
if (CMAKE_BUILD_TYPE MATCHES "Debug")
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -G")
endif()
set(CMAKE_MODULE_PATH ${CMAKE_PREFIX_PATH} "${PROJECT_SOURCE_DIR}/cmake")
if (CUDA)
endif()
# Pass options to NVCC
set(
CUDA_NVCC_FLAGS
${CUDA_NVCC_FLAGS};
-O3 -gencode arch=compute_30,code=sm_30
#-g -G
)
find_package(catkin REQUIRED COMPONENTS
roscpp
)
#add_subdirectory(src/HypDespot/)
set(BUILD_SHARED_LIBS OFF)
set(CUDA_SEPARABLE_COMPILATION ON)
set(POSITION_INDEPENDENT_CODE ON)
include_directories(
${catkin_INCLUDE_DIRS}
src/RVO2/src
src/HypDespot/include/
)
FILE(GLOB LIBRVO_SRCS src/RVO2/src/*.cpp)
catkin_package(
#INCLUDE_DIRS src/planner/
# LIBRARIES ped_path_predictor
CATKIN_DEPENDS roscpp #std_msgs
#DEPENDS system_lib
)
message("@@@@@@@@@@@@@@ before add lib @@@@@@@@@@@@@@")
add_subdirectory(src/HypDespot/)
add_subdirectory(src/HyP_examples/tiger)
add_subdirectory(src/HyP_examples/tag)
add_subdirectory(src/HyP_examples/adventurer)
add_subdirectory(src/HyP_examples/CarDriving)
add_subdirectory(src/HyP_examples/ma_rock_sample)
add_subdirectory(src/HyP_examples/unkown_navigation)
set_target_properties( "${PROJECT_NAME}"
PROPERTIES CUDA_SEPARABLE_COMPILATION ON)
set_target_properties( "${PROJECT_NAME}"
PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_compile_definitions(${PROJECT_NAME}
PRIVATE KW_EXPORTS
INTERFACE KW_IMPORTS
)
target_link_libraries("${PROJECT_NAME}"
${TinyXML_LIBRARIES}
)
# Install a DespotConfig.cmake file so CMake can find_package(Despot).
include(CMakePackageConfigHelpers)
configure_package_config_file("cmake/DespotConfig.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/DespotConfig.cmake"
INSTALL_DESTINATION "${CONFIG_INSTALL_PATH}"
PATH_VARS INCLUDE_INSTALL_PATH
)
message("@@@@@@@@@@@@@@ end @@@@@@@@@@@@@@")