Fixed build with TBB for Android
This commit is contained in:
		
							
								
								
									
										5
									
								
								3rdparty/tbb/CMakeLists.txt
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								3rdparty/tbb/CMakeLists.txt
									
									
									
									
										vendored
									
									
								
							@@ -119,7 +119,10 @@ endif()
 | 
			
		||||
add_library(tbb STATIC ${lib_srcs} ${lib_hdrs} "${CMAKE_CURRENT_SOURCE_DIR}/android_additional.h" "${CMAKE_CURRENT_SOURCE_DIR}/${tbb_version_file}")
 | 
			
		||||
target_link_libraries(tbb c m dl)
 | 
			
		||||
 | 
			
		||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -w -include \"${CMAKE_CURRENT_SOURCE_DIR}/android_additional.h\"")
 | 
			
		||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -include \"${CMAKE_CURRENT_SOURCE_DIR}/android_additional.h\"")
 | 
			
		||||
 | 
			
		||||
ocv_warnings_disable(CMAKE_CXX_FLAGS -Wundef -Wmissing-declarations)
 | 
			
		||||
string(REPLACE "-Werror=non-virtual-dtor" "" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
 | 
			
		||||
 | 
			
		||||
set_target_properties(tbb
 | 
			
		||||
  PROPERTIES OUTPUT_NAME tbb
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								3rdparty/tbb/version_string.tmp
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								3rdparty/tbb/version_string.tmp
									
									
									
									
										vendored
									
									
								
							@@ -6,4 +6,4 @@
 | 
			
		||||
"TBB: BUILD_GLIBC	Unknown" ENDL \
 | 
			
		||||
"TBB: BUILD_LD		Unknown" ENDL \
 | 
			
		||||
"TBB: BUILD_TARGET	Unknown" ENDL \
 | 
			
		||||
"TBB: BUILD_COMMAND	use cv::getBuildInformation() for details" ENDL \
 | 
			
		||||
"TBB: BUILD_COMMAND	use cv::getBuildInformation() for details" ENDL
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										2
									
								
								3rdparty/tbb/version_string.ver
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								3rdparty/tbb/version_string.ver
									
									
									
									
										vendored
									
									
								
							@@ -6,4 +6,4 @@
 | 
			
		||||
#N": BUILD_GLIBC	Unknown" ENDL \
 | 
			
		||||
#N": BUILD_LD		Unknown" ENDL \
 | 
			
		||||
#N": BUILD_TARGET	Unknown" ENDL \
 | 
			
		||||
#N": BUILD_COMMAND	use cv::getBuildInformation() for details" ENDL \
 | 
			
		||||
#N": BUILD_COMMAND	use cv::getBuildInformation() for details" ENDL
 | 
			
		||||
 
 | 
			
		||||
@@ -75,6 +75,7 @@ if(CMAKE_COMPILER_IS_GNUCXX)
 | 
			
		||||
  #add_extra_compiler_option(-Wcast-align)
 | 
			
		||||
  #add_extra_compiler_option(-Wstrict-aliasing=2)
 | 
			
		||||
  #add_extra_compiler_option(-Wshadow)
 | 
			
		||||
  add_extra_compiler_option(-Wno-unnamed-type-template-args)
 | 
			
		||||
 | 
			
		||||
  # The -Wno-long-long is required in 64bit systems when including sytem headers.
 | 
			
		||||
  if(X86_64)
 | 
			
		||||
 
 | 
			
		||||
@@ -1,6 +1,6 @@
 | 
			
		||||
if(ANDROID)
 | 
			
		||||
  add_subdirectory("${OpenCV_SOURCE_DIR}/3rdparty/tbb")
 | 
			
		||||
  ocv_include_directories(${TBB_INCLUDE_DIRS})
 | 
			
		||||
  include_directories(SYSTEM ${TBB_INCLUDE_DIRS})
 | 
			
		||||
  set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} tbb)
 | 
			
		||||
  add_definitions(-DTBB_USE_GCC_BUILTINS=1 -D__TBB_GCC_BUILTIN_ATOMICS_PRESENT=1 -D__TBB_USE_GENERIC_DWORD_LOAD_STORE=1)
 | 
			
		||||
  set(HAVE_TBB 1)
 | 
			
		||||
@@ -10,7 +10,7 @@ elseif(UNIX AND NOT APPLE)
 | 
			
		||||
  if(TBB_FOUND)
 | 
			
		||||
    set(HAVE_TBB 1)
 | 
			
		||||
    if(NOT ${TBB_INCLUDE_DIRS} STREQUAL "")
 | 
			
		||||
      ocv_include_directories(${TBB_INCLUDE_DIRS})
 | 
			
		||||
      include_directories(SYSTEM ${TBB_INCLUDE_DIRS})
 | 
			
		||||
    endif()
 | 
			
		||||
    link_directories(${TBB_LIBRARY_DIRS})
 | 
			
		||||
    set(OPENCV_LINKER_LIBS ${OPENCV_LINKER_LIBS} ${TBB_LIBRARIES})
 | 
			
		||||
@@ -63,7 +63,7 @@ if(NOT HAVE_TBB)
 | 
			
		||||
 | 
			
		||||
    set(HAVE_TBB 1)
 | 
			
		||||
    if(NOT "${TBB_INCLUDE_DIRS}" STREQUAL "")
 | 
			
		||||
      ocv_include_directories("${TBB_INCLUDE_DIRS}")
 | 
			
		||||
      include_directories(SYSTEM "${TBB_INCLUDE_DIRS}")
 | 
			
		||||
    endif()
 | 
			
		||||
  endif(TBB_INCLUDE_DIRS)
 | 
			
		||||
endif(NOT HAVE_TBB)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user