Commit a5969aec authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

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

parents b01cdf28 7ec6d8a3
ippicv
\ No newline at end of file
...@@ -14,7 +14,7 @@ ocv_include_directories("${CMAKE_CURRENT_SOURCE_DIR}" ${ZLIB_INCLUDE_DIR}) ...@@ -14,7 +14,7 @@ ocv_include_directories("${CMAKE_CURRENT_SOURCE_DIR}" ${ZLIB_INCLUDE_DIR})
file(GLOB lib_srcs *.c) file(GLOB lib_srcs *.c)
file(GLOB lib_hdrs *.h) file(GLOB lib_hdrs *.h)
if(NEON) if(NEON AND CMAKE_SIZEOF_VOID_P EQUAL 4)
list(APPEND lib_srcs arm/filter_neon.S) list(APPEND lib_srcs arm/filter_neon.S)
add_definitions(-DPNG_ARM_NEON) add_definitions(-DPNG_ARM_NEON)
endif() endif()
......
...@@ -19,6 +19,22 @@ if(ANDROID) ...@@ -19,6 +19,22 @@ if(ANDROID)
set(OPENCV_STATIC_LIBTYPE_CONFIGMAKE ${OPENCV_LIBTYPE_CONFIGMAKE}) set(OPENCV_STATIC_LIBTYPE_CONFIGMAKE ${OPENCV_LIBTYPE_CONFIGMAKE})
endif() 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 # setup lists of camera libs
foreach(abi ARMEABI ARMEABI_V7A X86 MIPS) foreach(abi ARMEABI ARMEABI_V7A X86 MIPS)
ANDROID_GET_ABI_RAWNAME(${abi} ndkabi) ANDROID_GET_ABI_RAWNAME(${abi} ndkabi)
......
...@@ -707,7 +707,7 @@ macro(__ocv_parse_test_sources tests_type) ...@@ -707,7 +707,7 @@ macro(__ocv_parse_test_sources tests_type)
set(__file_group_sources "") set(__file_group_sources "")
elseif(arg STREQUAL "DEPENDS_ON") elseif(arg STREQUAL "DEPENDS_ON")
set(__currentvar "OPENCV_TEST_${the_module}_DEPS") 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}") set(__file_group_name "${arg}")
else() else()
list(APPEND ${__currentvar} "${arg}") list(APPEND ${__currentvar} "${arg}")
...@@ -925,7 +925,7 @@ macro(__ocv_track_module_link_dependencies the_module optkind) ...@@ -925,7 +925,7 @@ macro(__ocv_track_module_link_dependencies the_module optkind)
if(__resolved_deps MATCHES "(^|;)${__rdep}(;|$)") if(__resolved_deps MATCHES "(^|;)${__rdep}(;|$)")
#all dependencies of this module are already resolved #all dependencies of this module are already resolved
list(APPEND ${the_module}_MODULE_DEPS_${optkind} "${__dep}") list(APPEND ${the_module}_MODULE_DEPS_${optkind} "${__dep}")
else() elseif(TARGET ${__dep})
get_target_property(__module_type ${__dep} TYPE) get_target_property(__module_type ${__dep} TYPE)
if(__module_type STREQUAL "STATIC_LIBRARY") if(__module_type STREQUAL "STATIC_LIBRARY")
if(NOT DEFINED ${__dep}_LIB_DEPENDS_${optkind}) if(NOT DEFINED ${__dep}_LIB_DEPENDS_${optkind})
...@@ -933,9 +933,9 @@ macro(__ocv_track_module_link_dependencies the_module optkind) ...@@ -933,9 +933,9 @@ macro(__ocv_track_module_link_dependencies the_module optkind)
endif() endif()
list(INSERT __mod_depends 0 ${${__dep}_LIB_DEPENDS_${optkind}} ${__dep}) list(INSERT __mod_depends 0 ${${__dep}_LIB_DEPENDS_${optkind}} ${__dep})
list(APPEND __resolved_deps "${__dep}") list(APPEND __resolved_deps "${__dep}")
elseif(NOT __module_type)
list(APPEND ${the_module}_EXTRA_DEPS_${optkind} "${__dep}")
endif() endif()
else()
list(APPEND ${the_module}_EXTRA_DEPS_${optkind} "${__dep}")
endif() endif()
#else() #else()
# get_target_property(__dep_location "${__dep}" LOCATION) # get_target_property(__dep_location "${__dep}" LOCATION)
......
...@@ -41,16 +41,15 @@ MACRO(_PCH_GET_COMPILE_FLAGS _out_compile_flags) ...@@ -41,16 +41,15 @@ MACRO(_PCH_GET_COMPILE_FLAGS _out_compile_flags)
STRING(TOUPPER "CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}" _flags_var_name) STRING(TOUPPER "CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}" _flags_var_name)
SET(${_out_compile_flags} ${${_flags_var_name}} ) SET(${_out_compile_flags} ${${_flags_var_name}} )
IF(CMAKE_COMPILER_IS_GNUCXX) GET_TARGET_PROPERTY(_targetPIC ${_PCH_current_target} POSITION_INDEPENDENT_CODE)
if (_targetPIC AND CMAKE_CXX_COMPILE_OPTIONS_PIC)
GET_TARGET_PROPERTY(_targetType ${_PCH_current_target} TYPE) LIST(APPEND ${_out_compile_flags} "${CMAKE_CXX_COMPILE_OPTIONS_PIC}")
IF(${_targetType} STREQUAL SHARED_LIBRARY AND NOT WIN32) elseif(CMAKE_COMPILER_IS_GNUCXX)
LIST(APPEND ${_out_compile_flags} "-fPIC") GET_TARGET_PROPERTY(_targetType ${_PCH_current_target} TYPE)
ENDIF() IF(${_targetType} STREQUAL SHARED_LIBRARY AND NOT WIN32)
LIST(APPEND ${_out_compile_flags} "-fPIC")
ELSE() ENDIF()
## TODO ... ? or does it work out of the box endif()
ENDIF()
GET_DIRECTORY_PROPERTY(DIRINC INCLUDE_DIRECTORIES ) GET_DIRECTORY_PROPERTY(DIRINC INCLUDE_DIRECTORIES )
FOREACH(item ${DIRINC}) FOREACH(item ${DIRINC})
......
...@@ -200,12 +200,12 @@ macro(OCV_OPTION variable description value) ...@@ -200,12 +200,12 @@ macro(OCV_OPTION variable description value)
endif() endif()
endforeach() endforeach()
unset(__varname) unset(__varname)
if("${__condition}" STREQUAL "") if(__condition STREQUAL "")
set(__condition 2 GREATER 1) set(__condition 2 GREATER 1)
endif() endif()
if(${__condition}) if(${__condition})
if("${__value}" MATCHES ";") if(__value MATCHES ";")
if(${__value}) if(${__value})
option(${variable} "${description}" ON) option(${variable} "${description}" ON)
else() else()
......
...@@ -153,7 +153,7 @@ CV_INLINE IppiSize ippiSize(const cv::Size & _size) ...@@ -153,7 +153,7 @@ CV_INLINE IppiSize ippiSize(const cv::Size & _size)
# include "arm_neon.h" # include "arm_neon.h"
# define CV_NEON 1 # define CV_NEON 1
# define CPU_HAS_NEON_FEATURE (true) # define CPU_HAS_NEON_FEATURE (true)
#elif defined(__ARM_NEON__) #elif defined(__ARM_NEON__) || defined(__ARM_NEON)
# include <arm_neon.h> # include <arm_neon.h>
# define CV_NEON 1 # define CV_NEON 1
# define CPU_HAS_NEON_FEATURE (true) # define CPU_HAS_NEON_FEATURE (true)
......
...@@ -7,6 +7,7 @@ using namespace std; ...@@ -7,6 +7,7 @@ using namespace std;
using namespace cv; using namespace cv;
namespace { namespace {
#if 0
void helpParser() void helpParser()
{ {
printf("\nThe CommandLineParser class is designed for command line arguments parsing\n" printf("\nThe CommandLineParser class is designed for command line arguments parsing\n"
...@@ -50,6 +51,7 @@ void helpParser() ...@@ -50,6 +51,7 @@ void helpParser()
" It also works with 'unsigned int', 'double', and 'float' types \n" " It also works with 'unsigned int', 'double', and 'float' types \n"
); );
} }
#endif
vector<string> split_string(const string& str, const string& delimiters) vector<string> split_string(const string& str, const string& delimiters)
{ {
......
...@@ -47,7 +47,7 @@ typedef unsigned __int64 uint64_t; ...@@ -47,7 +47,7 @@ typedef unsigned __int64 uint64_t;
# include <Intrin.h> # include <Intrin.h>
#endif #endif
#ifdef __ARM_NEON__ #if defined(__ARM_NEON__) || defined(__ARM_NEON)
# include "arm_neon.h" # include "arm_neon.h"
#endif #endif
...@@ -460,7 +460,7 @@ struct Hamming ...@@ -460,7 +460,7 @@ struct Hamming
ResultType operator()(Iterator1 a, Iterator2 b, size_t size, ResultType /*worst_dist*/ = -1) const ResultType operator()(Iterator1 a, Iterator2 b, size_t size, ResultType /*worst_dist*/ = -1) const
{ {
ResultType result = 0; ResultType result = 0;
#ifdef __ARM_NEON__ #if defined(__ARM_NEON__) || defined(__ARM_NEON)
{ {
uint32x4_t bits = vmovq_n_u32(0); uint32x4_t bits = vmovq_n_u32(0);
for (size_t i = 0; i < size; i += 16) { for (size_t i = 0; i < size; i += 16) {
......
...@@ -50,6 +50,9 @@ ...@@ -50,6 +50,9 @@
#include "precomp.hpp" #include "precomp.hpp"
#include "grfmt_tiff.hpp" #include "grfmt_tiff.hpp"
#define int64 int64_tiff
#define uint64 uint64_tiff
#ifdef HAVE_TIFF #ifdef HAVE_TIFF
# include "tiff.h" # include "tiff.h"
# include "tiffio.h" # include "tiffio.h"
......
...@@ -46,7 +46,7 @@ SIMD_DETECTION_PROGRAM=""" ...@@ -46,7 +46,7 @@ SIMD_DETECTION_PROGRAM="""
#if __MMX__ #if __MMX__
# error MMX # error MMX
#endif #endif
#if __ARM_NEON__ #if __ARM_NEON__ || __ARM_NEON
# error NEON # error NEON
#endif #endif
#error NOSIMD #error NOSIMD
......
...@@ -54,6 +54,7 @@ namespace ...@@ -54,6 +54,7 @@ namespace
const float FLO_TAG_FLOAT = 202021.25f; // check for this when READING the file 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 const char FLO_TAG_STRING[] = "PIEH"; // use this when WRITING the file
#ifdef DUMP
// binary file format for flow data specified here: // binary file format for flow data specified here:
// http://vision.middlebury.edu/flow/data/ // http://vision.middlebury.edu/flow/data/
void writeOpticalFlowToFile(const Mat_<Point2f>& flow, const string& fileName) void writeOpticalFlowToFile(const Mat_<Point2f>& flow, const string& fileName)
...@@ -76,6 +77,7 @@ namespace ...@@ -76,6 +77,7 @@ namespace
} }
} }
} }
#endif
// binary file format for flow data specified here: // binary file format for flow data specified here:
// http://vision.middlebury.edu/flow/data/ // http://vision.middlebury.edu/flow/data/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment