From 244a537d54a3927f0c42b8fdbb201511a8dc922f Mon Sep 17 00:00:00 2001 From: Ethan Rublee Date: Sat, 9 Oct 2010 02:15:08 +0000 Subject: [PATCH] _S happens to be a bad variable name for android --- CMakeLists.txt | 3 +++ modules/features2d/src/evaluation.cpp | 2 ++ modules/python/CMakeLists.txt | 6 +++++- tests/python/test.py | 1 + 4 files changed, 11 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fc1b873..a6955f2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,6 +24,9 @@ if (NOT CMAKE_INSTALL_PREFIX) endif() endif() +SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib") +SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) + set(CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "Configs" FORCE) set(CMAKE_C_FLAGS_MINSIZEREL "" CACHE INTERNAL "" FORCE) set(CMAKE_C_FLAGS_RELWITHDEBINFO "" CACHE INTERNAL "" FORCE) diff --git a/modules/features2d/src/evaluation.cpp b/modules/features2d/src/evaluation.cpp index c2ad098..99a47e9 100644 --- a/modules/features2d/src/evaluation.cpp +++ b/modules/features2d/src/evaluation.cpp @@ -46,6 +46,8 @@ using namespace cv; using namespace std; +//for android ndk +#undef _S static inline Point2f applyHomography( const Mat_& H, const Point2f& pt ) { double z = H(2,0)*pt.x + H(2,1)*pt.y + H(2,2); diff --git a/modules/python/CMakeLists.txt b/modules/python/CMakeLists.txt index 973a003..681f8d8 100644 --- a/modules/python/CMakeLists.txt +++ b/modules/python/CMakeLists.txt @@ -57,5 +57,9 @@ if(WIN32) ARCHIVE DESTINATION "Python${PYTHON_VERSION_MAJOR_MINOR}/Lib/site-packages" COMPONENT main ) else() - install(FILES ${LIBRARY_OUTPUT_PATH}/cv${CVPY_SUFFIX} DESTINATION ${PYTHON_PACKAGES_PATH}) + #install(FILES ${LIBRARY_OUTPUT_PATH}/cv${CVPY_SUFFIX} DESTINATION ${PYTHON_PACKAGES_PATH}) + install(TARGETS ${the_target} + RUNTIME DESTINATION ${PYTHON_PACKAGES_PATH} COMPONENT main + LIBRARY DESTINATION ${PYTHON_PACKAGES_PATH} COMPONENT main + ARCHIVE DESTINATION ${PYTHON_PACKAGES_PATH} COMPONENT main) endif() diff --git a/tests/python/test.py b/tests/python/test.py index 1bd725c..fe6c867 100644 --- a/tests/python/test.py +++ b/tests/python/test.py @@ -1,3 +1,4 @@ +import roslib; roslib.load_manifest('opencv2') import unittest import random import time -- 2.7.4