Skip to content

Commit 6c16057

Browse files
author
obyalian
committed
fix: add conditional installation of udev rules for package builds
1 parent 922ad22 commit 6c16057

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

orbbec_camera/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,10 @@ if(INSTALL_UDEV_RULES)
252252
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/scripts/99-obsensor-libusb.rules
253253
DESTINATION share/${PROJECT_NAME}/udev)
254254
endif()
255+
if(DEFINED ENV{BUILDING_PACKAGE})
256+
# Install udev rules
257+
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/scripts/99-obsensor-libusb.rules DESTINATION /etc/udev/rules.d)
258+
endif()
255259

256260
install(TARGETS list_devices_node list_depth_work_mode_node list_camera_profile_mode_node topic_statistics_node service_benchmark_node ob_benchmark_node 435le_example_node set_device_ip image_sync_example_node DESTINATION lib/${PROJECT_NAME}/
257261
)

0 commit comments

Comments
 (0)