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
4eede180
Commit
4eede180
authored
Apr 15, 2014
by
Vadim Pisarevsky
Committed by
OpenCV Buildbot
Apr 15, 2014
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2606 from alalek:icv_downloader
parents
9cdd15e1
047d285b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
111 additions
and
2 deletions
+111
-2
.gitignore
3rdparty/ippicv/.gitignore
+4
-0
downloader.cmake
3rdparty/ippicv/downloader.cmake
+100
-0
OpenCVFindIPP.cmake
cmake/OpenCVFindIPP.cmake
+7
-2
No files found.
3rdparty/ippicv/.gitignore
0 → 100644
View file @
4eede180
downloads/
macosx/
linux/
windows/
3rdparty/ippicv/downloader.cmake
0 → 100644
View file @
4eede180
#
# The script downloads ICV package
#
# On return this will define:
# OPENCV_ICV_PATH - path to unpacked downloaded package
#
function
(
_icv_downloader
)
# Define actual ICV versions
if
(
APPLE
)
set
(
OPENCV_ICV_PACKAGE_NAME
"ippicv_macosx.tar.gz"
)
set
(
OPENCV_ICV_PACKAGE_HASH
"d489e447906de7808a9a9d7e3f225f7a"
)
set
(
OPENCV_ICV_PLATFORM
"macosx"
)
elseif
(
UNIX AND NOT ANDROID
)
set
(
OPENCV_ICV_PACKAGE_NAME
"ippicv_linux.tar.gz"
)
set
(
OPENCV_ICV_PACKAGE_HASH
"42798c6cd6348bd40e74c425dc23338a"
)
set
(
OPENCV_ICV_PLATFORM
"linux"
)
elseif
(
WIN32 AND NOT ARM
)
set
(
OPENCV_ICV_PACKAGE_NAME
"ippicv_windows.zip"
)
set
(
OPENCV_ICV_PACKAGE_HASH
"2715f39ae65dc09bae3648bffe538706"
)
set
(
OPENCV_ICV_PLATFORM
"windows"
)
else
()
return
()
# Not supported
endif
()
set
(
OPENCV_ICV_PATH
"
${
CMAKE_CURRENT_LIST_DIR
}
/
${
OPENCV_ICV_PLATFORM
}
"
)
if
(
DEFINED OPENCV_ICV_PACKAGE_DOWNLOADED
AND OPENCV_ICV_PACKAGE_DOWNLOADED STREQUAL OPENCV_ICV_PACKAGE_HASH
AND EXISTS
${
OPENCV_ICV_PATH
}
)
# Package has been downloaded and checked by the previous build
set
(
OPENCV_ICV_PATH
"
${
OPENCV_ICV_PATH
}
"
PARENT_SCOPE
)
return
()
else
()
if
(
EXISTS
${
OPENCV_ICV_PATH
}
)
message
(
STATUS
"ICV: Removing previous unpacked package:
${
OPENCV_ICV_PATH
}
"
)
file
(
REMOVE_RECURSE
${
OPENCV_ICV_PATH
}
)
endif
()
endif
()
unset
(
OPENCV_ICV_PACKAGE_DOWNLOADED CACHE
)
set
(
OPENCV_ICV_PACKAGE_ARCHIVE
"
${
CMAKE_CURRENT_LIST_DIR
}
/downloads/
${
OPENCV_ICV_PLATFORM
}
-
${
OPENCV_ICV_PACKAGE_HASH
}
/
${
OPENCV_ICV_PACKAGE_NAME
}
"
)
get_filename_component
(
OPENCV_ICV_PACKAGE_ARCHIVE_DIR
"
${
OPENCV_ICV_PACKAGE_ARCHIVE
}
"
PATH
)
if
(
EXISTS
"
${
OPENCV_ICV_PACKAGE_ARCHIVE
}
"
)
file
(
MD5
"
${
OPENCV_ICV_PACKAGE_ARCHIVE
}
"
archive_md5
)
if
(
NOT archive_md5 STREQUAL OPENCV_ICV_PACKAGE_HASH
)
message
(
WARNING
"ICV: Local copy of ICV package has invalid MD5 hash:
${
archive_md5
}
(expected:
${
OPENCV_ICV_PACKAGE_HASH
}
)"
)
file
(
REMOVE
"
${
OPENCV_ICV_PACKAGE_ARCHIVE
}
"
)
file
(
REMOVE_RECURSE
"
${
OPENCV_ICV_PACKAGE_ARCHIVE_DIR
}
"
)
endif
()
endif
()
if
(
NOT EXISTS
"
${
OPENCV_ICV_PACKAGE_ARCHIVE
}
"
)
if
(
NOT DEFINED OPENCV_ICV_URL
)
if
(
NOT DEFINED ENV{OPENCV_ICV_URL}
)
# TODO Specify default URL after ICV publishing
message
(
STATUS
"ICV: downloading URL is not specified, skip downloading"
)
return
()
endif
()
set
(
OPENCV_ICV_URL $ENV{OPENCV_ICV_URL}
)
endif
()
file
(
MAKE_DIRECTORY
${
OPENCV_ICV_PACKAGE_ARCHIVE_DIR
}
)
message
(
STATUS
"ICV: Downloading
${
OPENCV_ICV_PACKAGE_NAME
}
..."
)
file
(
DOWNLOAD
"
${
OPENCV_ICV_URL
}
/
${
OPENCV_ICV_PACKAGE_NAME
}
"
"
${
OPENCV_ICV_PACKAGE_ARCHIVE
}
"
TIMEOUT 600 STATUS __status
EXPECTED_MD5
${
OPENCV_ICV_PACKAGE_HASH
}
)
if
(
NOT __status EQUAL 0
)
message
(
FATAL_ERROR
"ICV: Failed to download ICV package:
${
OPENCV_ICV_PACKAGE_NAME
}
. Status=
${
__status
}
"
)
else
()
# Don't remove this code, because EXPECTED_MD5 parameter doesn't fail "file(DOWNLOAD)" step
# on wrong hash
file
(
MD5
"
${
OPENCV_ICV_PACKAGE_ARCHIVE
}
"
archive_md5
)
if
(
NOT archive_md5 STREQUAL OPENCV_ICV_PACKAGE_HASH
)
message
(
FATAL_ERROR
"ICV: Downloaded copy of ICV package has invalid MD5 hash:
${
archive_md5
}
(expected:
${
OPENCV_ICV_PACKAGE_HASH
}
)"
)
endif
()
endif
()
endif
()
ocv_assert
(
EXISTS
"
${
OPENCV_ICV_PACKAGE_ARCHIVE
}
"
)
ocv_assert
(
NOT EXISTS
"
${
OPENCV_ICV_PATH
}
"
)
file
(
MAKE_DIRECTORY
${
OPENCV_ICV_PATH
}
)
ocv_assert
(
EXISTS
"
${
OPENCV_ICV_PATH
}
"
)
message
(
STATUS
"ICV: Unpacking
${
OPENCV_ICV_PACKAGE_NAME
}
to
${
OPENCV_ICV_PATH
}
..."
)
execute_process
(
COMMAND
${
CMAKE_COMMAND
}
-E tar xz
"
${
OPENCV_ICV_PACKAGE_ARCHIVE
}
"
WORKING_DIRECTORY
"
${
OPENCV_ICV_PATH
}
"
RESULT_VARIABLE __result
)
if
(
NOT __result EQUAL 0
)
message
(
FATAL_ERROR
"ICV: Failed to unpack ICV package from
${
OPENCV_ICV_PACKAGE_ARCHIVE
}
to
${
OPENCV_ICV_PATH
}
with error
${
__result
}
"
)
endif
()
set
(
OPENCV_ICV_PACKAGE_DOWNLOADED
"
${
OPENCV_ICV_PACKAGE_HASH
}
"
CACHE INTERNAL
"ICV package hash"
)
message
(
STATUS
"ICV: Package successfully downloaded"
)
set
(
OPENCV_ICV_PATH
"
${
OPENCV_ICV_PATH
}
"
PARENT_SCOPE
)
endfunction
()
_icv_downloader
()
cmake/OpenCVFindIPP.cmake
View file @
4eede180
...
...
@@ -140,7 +140,7 @@ macro(ipp_detect_version)
else
()
_ipp_not_supported
(
"IPP
${
IPP_VERSION_STR
}
at
${
IPP_ROOT_DIR
}
is not supported"
)
endif
()
if
(
X86_
64
)
if
(
IPP_X
64
)
_ipp_set_library_dir
(
${
IPP_LIBRARY_DIR
}
/intel64
)
else
()
_ipp_set_library_dir
(
${
IPP_LIBRARY_DIR
}
/ia32
)
...
...
@@ -221,7 +221,12 @@ if(DEFINED ENV{OPENCV_IPP_PATH} AND NOT DEFINED IPPROOT)
set
(
IPPROOT
"$ENV{OPENCV_IPP_PATH}"
)
endif
()
if
(
NOT DEFINED IPPROOT
)
set
(
IPPROOT
"
${
OpenCV_SOURCE_DIR
}
/3rdparty/ippicv"
)
include
(
"
${
OpenCV_SOURCE_DIR
}
/3rdparty/ippicv/downloader.cmake"
)
if
(
DEFINED OPENCV_ICV_PATH
)
set
(
IPPROOT
"
${
OPENCV_ICV_PATH
}
"
)
else
()
return
()
endif
()
endif
()
# Try ICV
...
...
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