Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
c6445e2d
Commit
c6445e2d
authored
Feb 27, 2012
by
Andrey Kamaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Slightly improved build of TBB for Android
parent
8b6aec67
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
20 deletions
+27
-20
CMakeLists.txt
3rdparty/tbb/CMakeLists.txt
+25
-16
OpenCVDetectTBB.cmake
cmake/OpenCVDetectTBB.cmake
+2
-4
No files found.
3rdparty/tbb/CMakeLists.txt
View file @
c6445e2d
...
...
@@ -5,9 +5,20 @@ endif()
project
(
tbb
)
set
(
tbb_ver
"tbb40_20111003oss"
)
set
(
tbb_url
"http://threadingbuildingblocks.org/uploads/77/177/4.0%20update%201/tbb40_20111003oss_src.tgz"
)
set
(
tbb_md5
"7b5d94eb35a563b29ef402e0fd8f15c9"
)
# 4.0 update 3 - build broken
#set(tbb_ver "tbb40_20120201oss")
#set(tbb_url "http://threadingbuildingblocks.org/uploads/77/182/4.0%20update%203/tbb40_20120201oss_src.tgz")
#set(tbb_md5 "4669e7d4adee018de7a7b8b972987218")
# 4.0 update 2 - works fine
set
(
tbb_ver
"tbb40_20111130oss"
)
set
(
tbb_url
"http://threadingbuildingblocks.org/uploads/77/180/4.0%20update%202/tbb40_20111130oss_src.tgz"
)
set
(
tbb_md5
"1e6926b21e865e79772119cd44fc3ad8"
)
# 4.0 update 1 - works fine
#set(tbb_ver "tbb40_20111003oss")
#set(tbb_url "http://threadingbuildingblocks.org/uploads/77/177/4.0%20update%201/tbb40_20111003oss_src.tgz")
#set(tbb_md5 "7b5d94eb35a563b29ef402e0fd8f15c9")
set
(
tbb_tarball
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/
${
tbb_ver
}
_src.tgz"
)
set
(
tbb_src_dir
"
${
CMAKE_CURRENT_BINARY_DIR
}
/
${
tbb_ver
}
"
)
...
...
@@ -68,8 +79,7 @@ if(NOT EXISTS "${tbb_src_dir}")
endif
()
endif
()
set
(
TBB_INCLUDE_DIRS
"
${
tbb_src_dir
}
/include"
CACHE PATH
"TBB headers location"
)
mark_as_advanced
(
TBB_INCLUDE_DIRS
)
set
(
TBB_INCLUDE_DIRS
"
${
tbb_src_dir
}
/include"
PARENT_SCOPE
)
include_directories
(
"
${
tbb_src_dir
}
/include"
"
${
tbb_src_dir
}
/src/"
...
...
@@ -78,23 +88,22 @@ include_directories("${tbb_src_dir}/include"
file
(
GLOB lib_srcs
"
${
tbb_src_dir
}
/src/tbb/*.cpp"
)
file
(
GLOB lib_hdrs
"
${
tbb_src_dir
}
/src/tbb/*.h"
)
list
(
APPEND lib_srcs
"
${
tbb_src_dir
}
/src/rml/client/rml_tbb.cpp"
)
add_definitions
(
-D__TBB_DYNAMIC_LOAD_ENABLED=0
-D__TBB_
NO_DLOPEN
-D__TBB_
WEAK_SYMBOLS
-D
TBB_USE_GCC_BUILTINS=1
-D
USE_PTHREAD
-D
__TBB_USE_GENERIC_DWORD_LOAD_STORE=1
-D
__TBB_GCC_BUILTIN_ATOMICS_PRESENT=1
-D
__TBB_BUILD=1
-DDO_ITT_NOTIFY
add_definitions
(
-D__TBB_DYNAMIC_LOAD_ENABLED=0
#required
-D__TBB_
BUILD=1
#required
-D__TBB_
USE_GENERIC_DWORD_LOAD_STORE=1
#needed by TBB 4.0 update 1,2
-D
__TBB_TASK_CPP_DIRECTLY_INCLUDED=1
#needed by TBB 4.0 update 3
-D
TBB_USE_GCC_BUILTINS=1
#required
-D
TBB_USE_DEBUG=0
#just ot be sure
-D
TBB_NO_LEGACY=1
#don't need backward compatibility
-D
USE_PTHREAD
#required
-DDO_ITT_NOTIFY
=0
#it seems that we don't need these notifications
)
add_library
(
tbb STATIC
${
lib_srcs
}
${
lib_hdrs
}
)
target_link_libraries
(
tbb c m dl
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
-fPIC"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
-w -include
\"
${
CMAKE_CURRENT_SOURCE_DIR
}
/android_additional.h
\"
"
)
set_target_properties
(
tbb
...
...
cmake/OpenCVDetectTBB.cmake
View file @
c6445e2d
if
(
ANDROID
)
set
(
HAVE_TBB 1
)
add_subdirectory
(
"
${
OpenCV_SOURCE_DIR
}
/3rdparty/tbb"
)
if
(
NOT
${
TBB_INCLUDE_DIRS
}
STREQUAL
""
)
include_directories
(
${
TBB_INCLUDE_DIRS
}
)
endif
()
include_directories
(
${
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
)
elseif
(
UNIX AND NOT APPLE
)
PKG_CHECK_MODULES
(
TBB tbb
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment