forked from uhobeike/livox_sdk2_vendor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
50 lines (38 loc) · 1.15 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
cmake_minimum_required(VERSION 3.10)
project(livox_sdk2_vendor)
if(NOT CMAKE_C_STANDARD)
set(CMAKE_C_STANDARD 99)
endif()
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
endif()
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
add_compile_options(-Wall -Wextra -Wpedantic)
endif()
find_package(ament_cmake_auto REQUIRED)
macro(build_livox_sdk2)
set(cmake_configure_args -Wno-dev)
set(cmake_configure_args -DCMAKE_INSTALL_PREFIX=${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}_install)
include(ExternalProject)
externalproject_add(livox_sdk2-ext
GIT_REPOSITORY https://github.com/Shinsotsu-Tsukuba-Challenger/Livox-SDK2
GIT_TAG 6a940156dd7151c3ab6a52442d86bc83613bd11b
TIMEOUT 6000
CMAKE_ARGS
${cmake_configure_args}
)
install(
DIRECTORY
${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}_install/
DESTINATION
${CMAKE_INSTALL_PREFIX}
)
endmacro()
build_livox_sdk2()
ament_export_include_directories(include)
ament_export_libraries(livox_lidar_sdk_shared)
if(BUILD_TESTING)
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
endif()
ament_auto_package()