Skip to content

Commit

Permalink
Updated CMakeList to find the JSONCpp library
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidGuamanDavila committed Jan 13, 2024
1 parent f972d6b commit 6917444
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ find_package(catkin REQUIRED COMPONENTS

find_package(OpenCV REQUIRED)



find_package(PkgConfig REQUIRED)
pkg_check_modules(JSONCPP jsoncpp)

## System dependencies are found with CMake's conventions
# find_package(Boost REQUIRED COMPONENTS system)
Expand Down Expand Up @@ -127,6 +127,7 @@ include_directories(
include
${catkin_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
${JSONCPP_INCLUDE_DIRS}
)

# Declare a C++ library
Expand All @@ -144,7 +145,11 @@ add_library(DetectedObjectLib
## With catkin_make all packages are built within a single CMake context
## The recommended prefix ensures that target names across packages don't collide
add_executable(object_detection src/object_detection.cpp)
target_link_libraries(object_detection ${catkin_LIBRARIES})
target_link_libraries(object_detection
${catkin_LIBRARIES}
${OpenCV_LIBRARIES}
${JSONCPP_LIBRARIES}
)
add_dependencies(object_detection ${catkin_EXPORTED_TARGETS} ${${PROJECT_NAME}_EXPORTED_TARGETS})


Expand Down

0 comments on commit 6917444

Please sign in to comment.