Merge pull request #3534 from taka-no-me:build_fixes

This commit is contained in:
Vadim Pisarevsky 2014-12-26 14:34:13 +00:00
commit a5969aec96
12 changed files with 44 additions and 21 deletions

1
3rdparty/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
ippicv

View File

@ -14,7 +14,7 @@ ocv_include_directories("${CMAKE_CURRENT_SOURCE_DIR}" ${ZLIB_INCLUDE_DIR})
file(GLOB lib_srcs *.c)
file(GLOB lib_hdrs *.h)
if(NEON)
if(NEON AND CMAKE_SIZEOF_VOID_P EQUAL 4)
list(APPEND lib_srcs arm/filter_neon.S)
add_definitions(-DPNG_ARM_NEON)
endif()

View File

@ -19,6 +19,22 @@ if(ANDROID)
set(OPENCV_STATIC_LIBTYPE_CONFIGMAKE ${OPENCV_LIBTYPE_CONFIGMAKE})
endif()
if (NOT COMMAND ANDROID_GET_ABI_RAWNAME)
macro( ANDROID_GET_ABI_RAWNAME TOOLCHAIN_FLAG VAR )
if( " ${TOOLCHAIN_FLAG}" STREQUAL " ARMEABI" )
set( ${VAR} "armeabi" )
elseif( " ${TOOLCHAIN_FLAG}" STREQUAL " ARMEABI_V7A" )
set( ${VAR} "armeabi-v7a" )
elseif( " ${TOOLCHAIN_FLAG}" STREQUAL " X86" )
set( ${VAR} "x86" )
elseif( " ${TOOLCHAIN_FLAG}" STREQUAL " MIPS" )
set( ${VAR} "mips" )
else()
set( ${VAR} "unknown" )
endif()
endmacro()
endif()
# setup lists of camera libs
foreach(abi ARMEABI ARMEABI_V7A X86 MIPS)
ANDROID_GET_ABI_RAWNAME(${abi} ndkabi)

View File

@ -707,7 +707,7 @@ macro(__ocv_parse_test_sources tests_type)
set(__file_group_sources "")
elseif(arg STREQUAL "DEPENDS_ON")
set(__currentvar "OPENCV_TEST_${the_module}_DEPS")
elseif("${__currentvar}" STREQUAL "__file_group_sources" AND NOT __file_group_name)
elseif(" ${__currentvar}" STREQUAL " __file_group_sources" AND NOT __file_group_name) # spaces to avoid CMP0054
set(__file_group_name "${arg}")
else()
list(APPEND ${__currentvar} "${arg}")
@ -925,7 +925,7 @@ macro(__ocv_track_module_link_dependencies the_module optkind)
if(__resolved_deps MATCHES "(^|;)${__rdep}(;|$)")
#all dependencies of this module are already resolved
list(APPEND ${the_module}_MODULE_DEPS_${optkind} "${__dep}")
else()
elseif(TARGET ${__dep})
get_target_property(__module_type ${__dep} TYPE)
if(__module_type STREQUAL "STATIC_LIBRARY")
if(NOT DEFINED ${__dep}_LIB_DEPENDS_${optkind})
@ -933,9 +933,9 @@ macro(__ocv_track_module_link_dependencies the_module optkind)
endif()
list(INSERT __mod_depends 0 ${${__dep}_LIB_DEPENDS_${optkind}} ${__dep})
list(APPEND __resolved_deps "${__dep}")
elseif(NOT __module_type)
list(APPEND ${the_module}_EXTRA_DEPS_${optkind} "${__dep}")
endif()
else()
list(APPEND ${the_module}_EXTRA_DEPS_${optkind} "${__dep}")
endif()
#else()
# get_target_property(__dep_location "${__dep}" LOCATION)

View File

@ -41,16 +41,15 @@ MACRO(_PCH_GET_COMPILE_FLAGS _out_compile_flags)
STRING(TOUPPER "CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}" _flags_var_name)
SET(${_out_compile_flags} ${${_flags_var_name}} )
IF(CMAKE_COMPILER_IS_GNUCXX)
GET_TARGET_PROPERTY(_targetType ${_PCH_current_target} TYPE)
IF(${_targetType} STREQUAL SHARED_LIBRARY AND NOT WIN32)
LIST(APPEND ${_out_compile_flags} "-fPIC")
ENDIF()
ELSE()
## TODO ... ? or does it work out of the box
ENDIF()
GET_TARGET_PROPERTY(_targetPIC ${_PCH_current_target} POSITION_INDEPENDENT_CODE)
if (_targetPIC AND CMAKE_CXX_COMPILE_OPTIONS_PIC)
LIST(APPEND ${_out_compile_flags} "${CMAKE_CXX_COMPILE_OPTIONS_PIC}")
elseif(CMAKE_COMPILER_IS_GNUCXX)
GET_TARGET_PROPERTY(_targetType ${_PCH_current_target} TYPE)
IF(${_targetType} STREQUAL SHARED_LIBRARY AND NOT WIN32)
LIST(APPEND ${_out_compile_flags} "-fPIC")
ENDIF()
endif()
GET_DIRECTORY_PROPERTY(DIRINC INCLUDE_DIRECTORIES )
FOREACH(item ${DIRINC})

View File

@ -200,12 +200,12 @@ macro(OCV_OPTION variable description value)
endif()
endforeach()
unset(__varname)
if("${__condition}" STREQUAL "")
if(__condition STREQUAL "")
set(__condition 2 GREATER 1)
endif()
if(${__condition})
if("${__value}" MATCHES ";")
if(__value MATCHES ";")
if(${__value})
option(${variable} "${description}" ON)
else()

View File

@ -153,7 +153,7 @@ CV_INLINE IppiSize ippiSize(const cv::Size & _size)
# include "arm_neon.h"
# define CV_NEON 1
# define CPU_HAS_NEON_FEATURE (true)
#elif defined(__ARM_NEON__)
#elif defined(__ARM_NEON__) || defined(__ARM_NEON)
# include <arm_neon.h>
# define CV_NEON 1
# define CPU_HAS_NEON_FEATURE (true)

View File

@ -7,6 +7,7 @@ using namespace std;
using namespace cv;
namespace {
#if 0
void helpParser()
{
printf("\nThe CommandLineParser class is designed for command line arguments parsing\n"
@ -50,6 +51,7 @@ void helpParser()
" It also works with 'unsigned int', 'double', and 'float' types \n"
);
}
#endif
vector<string> split_string(const string& str, const string& delimiters)
{

View File

@ -47,7 +47,7 @@ typedef unsigned __int64 uint64_t;
# include <Intrin.h>
#endif
#ifdef __ARM_NEON__
#if defined(__ARM_NEON__) || defined(__ARM_NEON)
# include "arm_neon.h"
#endif
@ -460,7 +460,7 @@ struct Hamming
ResultType operator()(Iterator1 a, Iterator2 b, size_t size, ResultType /*worst_dist*/ = -1) const
{
ResultType result = 0;
#ifdef __ARM_NEON__
#if defined(__ARM_NEON__) || defined(__ARM_NEON)
{
uint32x4_t bits = vmovq_n_u32(0);
for (size_t i = 0; i < size; i += 16) {

View File

@ -50,6 +50,9 @@
#include "precomp.hpp"
#include "grfmt_tiff.hpp"
#define int64 int64_tiff
#define uint64 uint64_tiff
#ifdef HAVE_TIFF
# include "tiff.h"
# include "tiffio.h"

View File

@ -46,7 +46,7 @@ SIMD_DETECTION_PROGRAM="""
#if __MMX__
# error MMX
#endif
#if __ARM_NEON__
#if __ARM_NEON__ || __ARM_NEON
# error NEON
#endif
#error NOSIMD

View File

@ -54,6 +54,7 @@ namespace
const float FLO_TAG_FLOAT = 202021.25f; // check for this when READING the file
const char FLO_TAG_STRING[] = "PIEH"; // use this when WRITING the file
#ifdef DUMP
// binary file format for flow data specified here:
// http://vision.middlebury.edu/flow/data/
void writeOpticalFlowToFile(const Mat_<Point2f>& flow, const string& fileName)
@ -76,6 +77,7 @@ namespace
}
}
}
#endif
// binary file format for flow data specified here:
// http://vision.middlebury.edu/flow/data/