Skip to content
Merged
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
19 changes: 10 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,15 @@ endif()
if( POLICY CMP0042 )
cmake_policy(SET CMP0042 NEW)
endif()
project( OpticalFlow )
project( optical_flow )

find_package(catkin REQUIRED COMPONENTS
klt_feature_tracker)

catkin_package(
INCLUDE_DIRS include
CATKIN_DEPENDS klt_feature_tracker
LIBRARIES ${PROJECT_NAME}
)

include_directories(
Expand All @@ -72,39 +73,39 @@ OPTION(OPENCV "ON for OpenCV" ON) # -DOPENCV=OFF
if(OpenCV_FOUND AND OPENCV)
message(STATUS "Building ${PROJECT_NAME} with OpenCV")

set(OpticalFlow_INCLUDE_DIRS
set(${PROJECT_NAME}_INCLUDE_DIRS
${catkin_INCLUDE_DIRS}
${OpenCV_INCLUDE_DIRS}
)

include_directories(OpticalFlow_INCLUDE_DIRS)
include_directories(${PROJECT_NAME}_INCLUDE_DIRS)

add_library( OpticalFlow SHARED
add_library( ${PROJECT_NAME} SHARED
src/optical_flow.cpp
src/px4flow.cpp
src/flow_px4.cpp
src/flow_opencv.cpp
)

target_link_libraries( OpticalFlow
target_link_libraries( ${PROJECT_NAME}
${OpenCV_LIBS}
${catkin_LIBRARIES}
)
else()
message(STATUS "Building ${PROJECT_NAME} without OpenCV")

set(OpticalFlow_INCLUDE_DIRS
set(${PROJECT_NAME}_INCLUDE_DIRS
${CMAKE_CURRENT_SOURCE_DIR}/include
)

include_directories(OpticalFlow_INCLUDE_DIRS)
include_directories(${PROJECT_NAME}_INCLUDE_DIRS)

add_library( OpticalFlow SHARED
add_library( ${PROJECT_NAME} SHARED
src/optical_flow.cpp
src/px4flow.cpp
src/flow_px4.cpp
)

endif()

target_include_directories(OpticalFlow PUBLIC include)
target_include_directories(${PROJECT_NAME} PUBLIC include)
2 changes: 1 addition & 1 deletion package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
-
-->
<package format="2">
<name>OpticalFlow</name>
<name>optical_flow</name>
<version>0.0.0</version>
<description>Optical flow package</description>

Expand Down