Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use EasyMile's fork of lms1xx. #42

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 18 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,33 @@
cmake_minimum_required(VERSION 2.8.3)
cmake_minimum_required(VERSION 3.0.2)
project(lms1xx)

find_package(Threads REQUIRED)

# 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})

set(LMS1xx_TAG "77fa47e3efa87634bd5f597e0758c4d304a1d3cd")
file(MAKE_DIRECTORY ${CATKIN_DEVEL_PREFIX}/include)
include(ExternalProject)
ExternalProject_Add(lms1xx_src
GIT_REPOSITORY https://github.com/EasyMile/lms1xx.git
GIT_TAG ${LMS1xx_TAG}
CMAKE_ARGS
-DCMAKE_INSTALL_PREFIX=${CATKIN_DEVEL_PREFIX}
)

# Regular catkin package follows.
find_package(catkin REQUIRED COMPONENTS roscpp sensor_msgs)
catkin_package(CATKIN_DEPENDS roscpp)
set(CMAKE_CXX_STANDARD 11)

include_directories(include ${catkin_INCLUDE_DIRS})
include_directories(include ${catkin_INCLUDE_DIRS} ${CATKIN_DEVEL_PREFIX}/include)
add_executable(LMS1xx_node src/LMS1xx_node.cpp)
target_link_libraries(LMS1xx_node LMS1xx ${catkin_LIBRARIES})

add_dependencies(LMS1xx_node lms1xx_src)
target_link_libraries(LMS1xx_node ${catkin_LIBRARIES} ${CATKIN_DEVEL_PREFIX}/lib/liblms1xx.a ${CMAKE_THREAD_LIBS_INIT})

install(TARGETS LMS1xx LMS1xx_node
install(TARGETS LMS1xx_node
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
Expand Down
178 changes: 0 additions & 178 deletions include/LMS1xx/LMS1xx.h

This file was deleted.

Loading