Skip to content

Commit

Permalink
Merge pull request #104 from AprilRobotics/topic/use-targets
Browse files Browse the repository at this point in the history
Move to using CMake target - requires v3.1.3 or newer
  • Loading branch information
wxmerkt committed Aug 23, 2021
2 parents c2d7e27 + eb74662 commit 4a0b5d1
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions apriltag_ros/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@ find_package(catkin REQUIRED COMPONENTS

find_package(Eigen3 REQUIRED)
find_package(OpenCV REQUIRED)

find_package(PkgConfig)
pkg_search_module(apriltag REQUIRED apriltag)
set(apriltag_INCLUDE_DIRS "${apriltag_INCLUDE_DIRS}/apriltag")
link_directories(${apriltag_LIBDIR})
find_package(apriltag REQUIRED)

# Set the build type. Options are:
# Coverage : w/ debug symbols, w/o optimization, w/ code-coverage
Expand Down Expand Up @@ -100,12 +96,11 @@ include_directories(include
${catkin_INCLUDE_DIRS}
${EIGEN3_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
${apriltag_INCLUDE_DIRS}
)

add_library(${PROJECT_NAME}_common src/common_functions.cpp)
add_dependencies(${PROJECT_NAME}_common ${PROJECT_NAME}_generate_messages_cpp)
target_link_libraries(${PROJECT_NAME}_common ${catkin_LIBRARIES} ${OpenCV_LIBRARIES} ${apriltag_LIBRARIES})
target_link_libraries(${PROJECT_NAME}_common ${catkin_LIBRARIES} ${OpenCV_LIBRARIES} apriltag::apriltag)

add_library(${PROJECT_NAME}_continuous_detector src/continuous_detector.cpp)
target_link_libraries(${PROJECT_NAME}_continuous_detector ${PROJECT_NAME}_common ${catkin_LIBRARIES})
Expand Down

0 comments on commit 4a0b5d1

Please sign in to comment.