ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

I think the issue is that you have specified the full name of libccv.a and should instead use the shortened ccv form.

Also, according to the cmake documentation, find_library won't display an error message if the library is not found. Try this, instead:

set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)
rosbuild_add_executable(${PROJECT_NAME} src/TDetector.cpp src/TRecognizer.cpp src/${PROJECT_NAME}.cpp)

FIND_LIBRARY(ccv ccv PATHS ${LIBRARY_OUTPUT_PATH}))
if (CCV)
  message(STATUS "Library(CCV) found in ${CCV}")
else()
  message(FATAL_ERROR "Library (CCV) not found")
endif()

include_directories(${PROJECT_SOURCE_DIR}/src)
FIND_LIBRARY(jpeg libjpeg.a PATHS usr/lib)
FIND_LIBRARY(png libpng.a PATHS usr/lib)
target_link_libraries(${PROJECT_NAME} ${ccv} ${jpeg} ${png})

You should probably be using find_package(jpeg REQUIRED) and find_package(png REQUIRED) instead, but what you have listed above will probably work also.