summarylogtreecommitdiffstats
path: root/fix-opencv2-and-numpy-path.patch
diff options
context:
space:
mode:
authorJerry Lin2018-11-04 01:10:39 +0800
committerJerry Lin2018-11-04 01:10:39 +0800
commit5ff50e64f4b534f661a4fddccff1cc5689c5d73b (patch)
tree294f81417860c0d1ab951c1f65b2e386ad1d1ca1 /fix-opencv2-and-numpy-path.patch
parent8ce66cf91524f7dc4d4c7958f5319c645d8061d8 (diff)
downloadaur-ros-indigo-pano-py.tar.gz
Update to 2.3.3-2. Fix OpenCV 2 and NumPy path.
Diffstat (limited to 'fix-opencv2-and-numpy-path.patch')
-rw-r--r--fix-opencv2-and-numpy-path.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/fix-opencv2-and-numpy-path.patch b/fix-opencv2-and-numpy-path.patch
new file mode 100644
index 000000000000..92c5febb95d7
--- /dev/null
+++ b/fix-opencv2-and-numpy-path.patch
@@ -0,0 +1,34 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 96d0ef7d..c192b6b5 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,13 +1,20 @@
+ cmake_minimum_required(VERSION 2.8.3)
+ project(pano_py)
+
++set("OpenCV_DIR" "/opt/opencv2/share/opencv2")
++
+ # Load catkin and all dependencies required for this package
+ find_package(catkin REQUIRED COMPONENTS pano_core rospy roscpp std_msgs image_transport cv_bridge)
+ find_package(Boost REQUIRED COMPONENTS python)
+ find_package(PythonLibs REQUIRED)
+-find_package(OpenCV REQUIRED)
++find_package(OpenCV REQUIRED NO_DEFAULT_PATH)
++
++execute_process(
++ COMMAND "${PYTHON_EXECUTABLE}" -c
++ "from __future__ import print_function\ntry: import numpy; print(numpy.get_include(), end='')\nexcept:pass\n"
++ OUTPUT_VARIABLE __numpy_include_dir)
+
+-include_directories(include ${Boost_INCLUDE_DIR} ${catkin_INCLUDE_DIRS} ${PYTHON_INCLUDE_PATH} ${OpenCV_INCLUDE_DIRS})
++include_directories(include ${Boost_INCLUDE_DIR} ${catkin_INCLUDE_DIRS} ${PYTHON_INCLUDE_PATH} ${OpenCV_INCLUDE_DIRS} ${__numpy_include_dir})
+
+ add_subdirectory(src/pano_cv)
+ add_subdirectory(src/pano_py)
+@@ -30,4 +37,4 @@ catkin_add_env_hooks(15.ld_lib_path SHELLS bash tcsh zsh DIRECTORY ${CMAKE_CURRE
+
+ install(DIRECTORY include/${PROJECT_NAME}/
+ DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
+-)
+\ No newline at end of file
++)