-
Notifications
You must be signed in to change notification settings - Fork 4
/
CMakeLists.txt
47 lines (38 loc) · 1.53 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
# sub project
message(STATUS "operation system is ${CMAKE_SYSTEM}")
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
message(STATUS "current platform: Linux ")
set(LDLIDAR_DRIVER_SOURCE_LINUX
${CMAKE_CURRENT_SOURCE_DIR}/src/ldlidar_driver.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/ldlidar_driver_linux.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/ldlidar_dataprocess.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/ldlidar_protocol.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/log_module.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/network_socket_interface_linux.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/serial_interface_linux.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/sl_transform.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/slbf.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/tofbf.cpp
)
add_library(ldlidar_driver STATIC
${LDLIDAR_DRIVER_SOURCE_LINUX}
)
elseif(CMAKE_SYSTEM_NAME MATCHES "Windows")
message(STATUS "current platform: Windows")
set(LDLIDAR_DRIVER_SOURCE_WIN
${CMAKE_CURRENT_SOURCE_DIR}/src/ldlidar_driver.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/ldlidar_driver_win.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/ldlidar_dataprocess.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/ldlidar_protocol.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/log_module.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/serial_interface_win.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/sl_transform.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/slbf.cpp
${CMAKE_CURRENT_SOURCE_DIR}/src/tofbf.cpp
)
add_library(ldlidar_driver STATIC
${LDLIDAR_DRIVER_SOURCE_WIN}
)
else()
message(STATUS "other platform: ${CMAKE_SYSTEM_NAME}")
endif (CMAKE_SYSTEM_NAME MATCHES "Linux")