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

How to add the library to my code after "make install" #129

Closed
dottantgal opened this issue May 23, 2016 · 1 comment
Closed

How to add the library to my code after "make install" #129

dottantgal opened this issue May 23, 2016 · 1 comment

Comments

@dottantgal
Copy link

dottantgal commented May 23, 2016

Hi, I wanna add the library to my own code, but I don't know how to include it in the Cmakelists file.
It gives me an error "fatal error: serial/serial.h"
This is how my CMakeLists looks like

cmake_minimum_required(VERSION 2.8.3)
project(serial_sensor)
set (BINNAME serial_sensor)
set (SRCS1 ${SRCS1} src/serial_sensor.cpp)
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
tf
message_generation
)
add_message_files(
FILES
Altitude.msg
Heading.msg
Pressure.msg
)
generate_messages(
DEPENDENCIES
std_msgs
)
catkin_package(
LIBRARIES serial
CATKIN_DEPENDS message_runtime
)
include_directories(${CMAKE_CURRENT_SOURCE_DIR})
include_directories(include ${catkin_INCLUDE_DIRS})
add_executable(serial_motors src/serial_motors.cpp)
target_link_libraries(serial_motors ${catkin_LIBRARIES})
add_executable (${BINNAME} ${SRCS1})
add_dependencies(${BINNAME} ${PROJECT_NAME}_generate_messages_cpp)
target_link_libraries(${BINNAME} ${catkin_LIBRARIES})

I ve followed the "how to" till the "make install" and this last command gives me

Install the project...
-- Install configuration: ""
-- Installing: /tmp/usr/local/_setup_util.py
-- Installing: /tmp/usr/local/env.sh
-- Installing: /tmp/usr/local/setup.bash
-- Installing: /tmp/usr/local/setup.sh
-- Installing: /tmp/usr/local/setup.zsh
-- Installing: /tmp/usr/local/.rosinstall
-- Installing: /tmp/usr/local/lib/pkgconfig/serial.pc
-- Installing: /tmp/usr/local/share/serial/cmake/serialConfig.cmake
-- Installing: /tmp/usr/local/share/serial/cmake/serialConfig-version.cmake
-- Installing: /tmp/usr/local/share/serial/package.xml
-- Installing: /tmp/usr/local/lib/libserial.so
-- Installing: /tmp/usr/local/include/serial/serial.h
-- Installing: /tmp/usr/local/include/serial/v8stdint.h

is it strange that it installs under the tmp folder?
Thank you

@wjwwood
Copy link
Owner

wjwwood commented May 23, 2016

duplicate of #128

@wjwwood wjwwood closed this as completed May 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants