forked from ekumenlabs/roscpp_android
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ekumenlabs#24 from Intermodalics/fix-opencv-linking
Fix opencv linker errors
- Loading branch information
Showing
3 changed files
with
48 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,34 @@ | ||
--- catkin_ws/src/vision_opencv/cv_bridge/CMakeLists.txt 2014-12-16 13:23:41.106085276 -0300 | ||
+++ catkin_ws/src/vision_opencv/cv_bridge/CMakeLists.txt 2014-12-16 13:25:29.358088880 -0300 | ||
@@ -3,7 +3,11 @@ | ||
--- catkin_ws/src/vision_opencv/cv_bridge/CMakeLists.txt | ||
+++ catkin_ws/src/vision_opencv/cv_bridge/CMakeLists.txt | ||
@@ -25,7 +25,6 @@ catkin_package( | ||
INCLUDE_DIRS include | ||
LIBRARIES ${PROJECT_NAME} | ||
CATKIN_DEPENDS rosconsole sensor_msgs | ||
- DEPENDS OpenCV | ||
CFG_EXTRAS cv_bridge-extras.cmake | ||
) | ||
|
||
find_package(catkin REQUIRED COMPONENTS rosconsole sensor_msgs) | ||
--- catkin_ws/src/vision_opencv/cv_bridge/cmake/cv_bridge-extras.cmake.in | ||
+++ catkin_ws/src/vision_opencv/cv_bridge/cmake/cv_bridge-extras.cmake.in | ||
@@ -1,12 +1,7 @@ | ||
-set(OpenCV_VERSION @OpenCV_VERSION@) | ||
-set(OpenCV_VERSION_MAJOR @OpenCV_VERSION_MAJOR@) | ||
-set(OpenCV_VERSION_MINOR @OpenCV_VERSION_MINOR@) | ||
-set(OpenCV_VERSION_PATCH @OpenCV_VERSION_PATCH@) | ||
-set(OpenCV_SHARED @OpenCV_SHARED@) | ||
-set(OpenCV_CONFIG_PATH @OpenCV_CONFIG_PATH@) | ||
-set(OpenCV_INSTALL_PATH @OpenCV_INSTALL_PATH@) | ||
-set(OpenCV_LIB_COMPONENTS @OpenCV_LIB_COMPONENTS@) | ||
-set(OpenCV_USE_MANGLED_PATHS @OpenCV_USE_MANGLED_PATHS@) | ||
-set(OpenCV_MODULES_SUFFIX @OpenCV_MODULES_SUFFIX@) | ||
- | ||
+find_package(OpenCV 3 REQUIRED | ||
+ COMPONENTS | ||
+ opencv_core | ||
+ opencv_imgproc | ||
+ opencv_imgcodecs | ||
+ CONFIG | ||
+) | ||
|
||
+if(NOT ANDROID) | ||
find_package(Boost REQUIRED python) | ||
+else() | ||
+find_package(Boost REQUIRED) | ||
+endif() | ||
find_package(OpenCV REQUIRED) | ||
if (OpenCV_VERSION VERSION_EQUAL "3") | ||
add_definitions("-DOPENCV3=1") | ||
@@ -21,7 +25,9 @@ | ||
include_directories(SYSTEM ${Boost_INCLUDE_DIRS} ${OpenCV_INCLUDE_DIRS}) | ||
include_directories(include ${catkin_INCLUDE_DIRS}) | ||
|
||
+if(NOT ANDROID) | ||
add_subdirectory(python) | ||
+endif() | ||
add_subdirectory(src) | ||
if(CATKIN_ENABLE_TESTING) | ||
add_subdirectory(test) | ||
--- catkin_ws/src/vision_opencv/cv_bridge/src/CMakeLists.txt 2014-12-12 14:16:26.261088783 -0300 | ||
+++ catkin_ws/src/vision_opencv/cv_bridge/src/CMakeLists.txt 2014-12-12 14:17:17.117087617 -0300 | ||
@@ -5,6 +5,7 @@ | ||
|
||
install(TARGETS ${PROJECT_NAME} DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}) | ||
|
||
+if(NOT ANDROID) | ||
# add a Boost Python library | ||
find_package(PythonInterp REQUIRED) | ||
find_package(PythonLibs "${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}") | ||
@@ -54,3 +55,4 @@ | ||
endif() | ||
|
||
install(TARGETS ${PROJECT_NAME}_boost DESTINATION ${CATKIN_PACKAGE_PYTHON_DESTINATION}/boost/) | ||
+endif() | ||
+list(APPEND @PROJECT_NAME@_LIBRARIES ${OpenCV_LIBRARIES}) | ||
+list(APPEND @PROJECT_NAME@_INCLUDE_DIRS ${OpenCV_INCLUDE_DIRS}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters