-
-
Notifications
You must be signed in to change notification settings - Fork 74
/
Copy pathros-noetic-lms1xx.win.patch
61 lines (53 loc) · 2.07 KB
/
ros-noetic-lms1xx.win.patch
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
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c8dedc7..2cd8c5b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,34 +1,39 @@
cmake_minimum_required(VERSION 2.8.3)
project(lms1xx)
-# Build ROS-independent library.
-find_package(console_bridge REQUIRED)
-include_directories(include ${console_bridge_INCLUDE_DIRS})
-add_library(LMS1xx src/LMS1xx.cpp)
-target_link_libraries(LMS1xx ${console_bridge_LIBRARIES})
+if(UNIX)
+ # Build ROS-independent library.
+ find_package(console_bridge REQUIRED)
+ include_directories(include ${console_bridge_INCLUDE_DIRS})
+ add_library(LMS1xx src/LMS1xx.cpp)
+ target_link_libraries(LMS1xx ${console_bridge_LIBRARIES})
+endif()
# Regular catkin package follows.
find_package(catkin REQUIRED COMPONENTS roscpp sensor_msgs)
catkin_package(CATKIN_DEPENDS roscpp)
-include_directories(include ${catkin_INCLUDE_DIRS})
-add_executable(LMS1xx_node src/LMS1xx_node.cpp)
-target_link_libraries(LMS1xx_node LMS1xx ${catkin_LIBRARIES})
-
+if(UNIX)
+ include_directories(include ${catkin_INCLUDE_DIRS})
+ add_executable(LMS1xx_node src/LMS1xx_node.cpp)
+ target_link_libraries(LMS1xx_node LMS1xx ${catkin_LIBRARIES})
-install(TARGETS LMS1xx LMS1xx_node
- ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
- LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
- RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
-)
+ install(TARGETS LMS1xx LMS1xx_node
+ ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
+ RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
+ )
+endif()
install(DIRECTORY meshes launch urdf
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})
-install(PROGRAMS scripts/find_sick scripts/set_sick_ip
- DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
+if(UNIX)
+ install(PROGRAMS scripts/find_sick scripts/set_sick_ip
+ DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
+endif()
-if (CATKIN_ENABLE_TESTING)
+if (CATKIN_ENABLE_TESTING AND UNIX)
catkin_add_gtest(test_buffer test/test_buffer.cpp)
target_link_libraries(test_buffer ${catkin_LIBRARIES})