Commit Graph

374 Commits

Author SHA1 Message Date
Jonathan Cole
69e1167882 Delete xcframework if it already exists before building a new one 2020-11-30 16:51:48 -05:00
Alexander Alekhin
77b986c7a1 apple/build_xcframework.py: python syntax
- make happy old Python linters
2020-11-27 13:54:14 +00:00
Alexander Alekhin
5c987e4c75
Merge pull request #18924 from alalek:4.x-xcode12
(4.x) build: Xcode 12 support

* build: xcode 12 support, cmake fixes

* ts: eliminate clang 11 warnigns

* 3rdparty: clang 11 warnings

* features2d: eliminate build warnings

* test: warnings

* gapi: warnings from 18928
2020-11-26 22:56:59 +00:00
Jonathan Cole
85b0fb2a9c
Merge pull request #18826 from Rightpoint:feature/colejd/build-catalyst-xcframework
Support XCFramework builds, Catalyst

* Early work on xcframework support

* Improve legibility

* Somehow this works

* Specify ABIs in a place where they won't get erased

If you pass in the C/CXX flags from the Python script, they won't be respected. By doing it in the actual toolchain, the options are respected and Catalyst successfully links.

* Clean up and push updates

* Actually use Catalyst ABI

Needed to specify EXE linker flags to get compiler tests to link to the Catalyst ABIs.

* Clean up

* Revert changes to common toolchain that don't matter

* Try some things

* Support Catalyst build in OSX scripts

* Remove unnecessary iOS reference to AssetsLibrary framework

* Getting closer

* Try some things, port to Python 3

* Some additional fixes

* Point Cmake Plist gen to osx directory for Catalyst targets

* Remove dynamic lib references for Catalyst, copy iOS instead of macos

* Add flag for building only specified archs, remove iOS catalyst refs

* Add build-xcframework.sh

* Update build-xcframework.sh

* Add presumptive Apple Silicon support

* Add arm64 iphonesimulator target

* Fix xcframework build

* Working on arm64 iOS simulator

* Support 2.7 (replace run with check_output)

* Correctly check output of uname_m against arch

* Clean up

* Use lipo for intermediate frameworks, add python script

Remove unneeded __init__.py

* Simplify python xcframework build script

* Add --only-64-bit flag

* Add --framework-name flag

* Document

* Commit to f-strings, improve console output

* Add i386 to iphonesimulator platform in xcframework generator

* Enable objc for non-Catalyst frameworks

* Fix xcframework builder for paths with spaces

* Use arch when specifying Catalyst build platform in build command

* Fix incorrect settings for framework_name argparse configuration

* Prefer underscores instead of hyphens in new flags

* Move Catalyst flags to where they'll actually get used

* Use --without=objc on Catalyst target for now

* Remove get_or_create_folder and simplify logic

* Remove unused import

* Tighten up help text

* Document

* Move common functions into cv_build_utils

* Improve documentation

* Remove old build script

* Add readme

* Check for required CMake and Xcode versions

* Clean up TODOs and re-enable `copy_samples()`

Remove TODO

Fixup

* Add missing print_function import

* Clarify CMake dependency documentation

* Revert python2 change in gen_objc

* Remove unnecessary builtins imports

* Remove trailing whitespace

* Avoid building Catalyst unless specified

This makes Catalyst support a non-breaking change, though defaults should be specified when a breaking change is possible.

* Prevent lipoing for the same archs on different platforms before build

* Rename build-xcframework.py to build_xcframework.py

* Check for duplicate archs more carefully

* Prevent sample copying error when directory already exists

This can happen when building multiple architectures for the same platform.

* Simplify code for checking for default archs

* Improve build_xcframework.py header text

* Correctly resolve Python script paths

* Parse only known args in ios/osx build_framework.py

* Pass through uncaptured args in build_xcframework to osx/ios build

* Fix typo

* Fix typo

* Fix unparameterized build path for intermediate frameworks

* Fix dyanmic info.plist path for catalyst

* Fix utf-8 Python 3 issue

* Add dynamic flag to osx script

* Rename platform to platforms, remove armv7s and i386

* Fix creation of dynamic framework on maccatalyst and macos

* Update platforms/apple/readme.md

* Add `macos_archs` flag and deprecate `archs` flag

* Allow specification of archs when generating xcframework from terminal

* Change xcframework platform argument names to match archs flag names

* Remove platforms as a concept and shadow archs flags from ios/osx .py

* Improve documentation

* Fix building of objc module on Catalyst, excluding Swift

* Clean up build folder logic a bit

* Fix framework_name flag

* Drop passthrough_args, use unknown_args instead

* minor: coding style changes

Co-authored-by: Chris Ballinger <cballinger@rightpoint.com>
2020-11-24 21:54:54 +00:00
Alexander Alekhin
2687a2b6dc pre: OpenCV 4.5.1 (version++) 2020-11-18 11:04:54 +00:00
Alexander Alekhin
9e84b860f2 cmake: update objc generator scripts
- allow to run generator without strong requirement of building 'objc' module
2020-11-14 20:59:55 +00:00
Chris Ballinger
4d00ed8df7
Merge pull request #18771 from chrisballinger:xcode-12-fixes
Xcode 12 and Python 2/3 fixes

* Fix compilation issues using Xcode 12 on macOS Catalina

* Fix macOS scripts to work on Python 2 or 3

* Fix additional issues with Python 3

* Fix additional Python 2/3 issue

* Fix another Python 2/3 issue

* Remove dependency on builtins module
2020-11-13 15:30:53 +00:00
Alexander Alekhin
e8058b9fdb Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-10-21 15:55:23 +00:00
Kun Liang
c82417697a
Merge pull request #18068 from lionkunonly:gsoc_2020_simd
[GSoC] OpenCV.js: WASM SIMD optimization 2.0

* gsoc_2020_simd Add perf test for filter2d

* add perf test for kernel scharr and kernel gaussianBlur

* add perf test for blur, medianBlur, erode, dilate

* fix the errors for the opencv PR robot

fix the trailing whitespace.

* add perf tests for kernel remap, warpAffine, warpPersepective, pyrDown

* fix a bug in  modules/js/perf/perf_imgproc/perf_remap.js

* add function smoothBorder in helpfun.js and remove replicated function in perf test of warpAffine and warpPrespective

* fix the trailing white space issues

* add OpenCV.js loader

* Implement the Loader with help of WebAssembly Feature Detection, remove trailing whitespaces

* modify the explantion for loader in js_setup.markdown and fix bug in loader.js
2020-10-18 20:30:36 +00:00
Alexander Alekhin
1048feac3b build: winpack_dldt with videoio plugins 2020-10-13 13:41:07 +00:00
Alexander Alekhin
1b443219ed Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-10-09 20:09:26 +00:00
Alexander Alekhin
1546b9bf99 build: winpack_dldt with dldt 2021.1.0 2020-10-07 16:16:53 +00:00
Alexander Alekhin
6f5d56d994 core(logger): avoid destruction of GlobalLoggingInitStruct object
- keep logger available until the program termination
2020-10-06 12:50:32 +00:00
Alexander Alekhin
01e23a2222 Merge pull request #18439 from komakai:opencl 2020-09-29 15:07:28 +00:00
Giles Payne
b29f73d5e0 Android OpenCL support 2020-09-29 21:55:31 +09:00
Alexander Alekhin
295afd5882 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-09-28 21:33:29 +00:00
Alexander Alekhin
c16e2e6234 ios: don't force BUILD_opencv_world=OFF in case of excluded modules 2020-09-28 01:11:15 +00:00
Giles Payne
6a7df4e973 Modify install_name 2020-09-27 21:12:27 +09:00
Alexander Alekhin
a12ceb04bb pre: OpenCV 4.5.0 (version++) 2020-09-08 06:08:58 +00:00
Alexander Alekhin
50ff40d684 pre: OpenCV 3.4.12 (version++) 2020-09-06 22:26:32 +00:00
Giles Payne
60354e3901
Merge pull request #18094 from komakai:macos-universal-binary
* Universal Build for Big Sur

* Refactor MacOS/iOS build to only ever build one architecture at a time + improve code readability

* Workaround for CMake issue 20989
2020-08-30 01:41:54 +03:00
Vadim Pisarevsky
5108e3ced6
Merge pull request #18073 from vpisarev:apache2_license
changed OpenCV license from BSD to Apache 2 license

* as discussed and announced earlier, changed OpenCV license from BSD to Apache 2. Many files still contain old-style copyrights though

* changed wording a bit; preserve the original OpenCV BSD license
2020-08-17 11:49:11 +00:00
Giles Payne
bedabc15ae Obj-C/Swift docs improvements 2020-08-09 16:53:10 +09:00
Alexander Alekhin
422f802ec9 Merge pull request #17922 from joy2myself:build_riscv_with_c++_intrin 2020-08-04 09:45:32 +00:00
Zhangyin
ff4c3873f2 Added cmake toolchain for RISC-V with clang.
- Added cross compile cmake file for target riscv64-clang
- Extended cmake for RISC-V and added instruction checks
- Created intrin_rvv.hpp with C++ version universal intrinsics
2020-08-03 20:18:56 +08:00
Alexander Alekhin
9b7b22ee0e Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-07-16 20:13:27 +00:00
Alexander Alekhin
f8d6c5b330 winpack_dldt: switch defaults to OpenVINO 2020.4 2020-07-15 22:13:19 +00:00
Giles Payne
af9ee90091
Merge pull request #17818 from komakai:documentation-improvements
Documentation fixes/improvements

* Documentation fixes/improvements

* Remove HASH_UTILS defines
2020-07-15 18:42:05 +00:00
Alexander Alekhin
44d473fba0 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-07-08 21:03:43 +00:00
Alexander Alekhin
ccf6dd07b3 build: winpack_dldt with dldt 2020.4.0 2020-07-06 14:08:54 +00:00
Giles Payne
59ba33658a Dynamic build for Objective-C/Swift wrapper 2020-06-26 08:26:05 +09:00
Alexander Alekhin
e3d502310f Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-06-19 07:33:50 +00:00
Alex Cohn
a7cc1159cd
Merge pull request #17573 from alexcohn:fix/android_windows_build
* fixing #17572

https://github.com/opencv/opencv/issues/17572 Build for Android failed: "can't concat str to bytes"

on Windows 10 64bit with python 3.6.6

* similar to changes in platforms/winpack_dldt/build_package.py
2020-06-18 10:40:43 +03:00
Alexander Alekhin
6fdddd53a1 Merge pull request #17555 from komakai:objc-fix-sift 2020-06-17 07:58:35 +00:00
Alex Studer
d84b213f59
platforms/android: fix --no_samples_build flag not working 2020-06-16 00:11:26 -04:00
Giles Payne
305a245530 Fix framework_name option in build script 2020-06-15 23:15:05 +09:00
Alexander Alekhin
5f3012fc9a pre: OpenCV 4.4.0 (version++) 2020-06-09 02:27:13 +00:00
Alexander Alekhin
a43e3bebe6 pre: OpenCV 3.4.11 (version++) 2020-06-08 18:46:27 +00:00
Giles Payne
02385472b6
Merge pull request #17165 from komakai:objc-binding
Objc binding

* Initial work on Objective-C wrapper

* Objective-C generator script; update manually generated wrappers

* Add Mat tests

* Core Tests

* Imgproc wrapper generation and tests

* Fixes for Imgcodecs wrapper

* Miscellaneous fixes. Swift build support

* Objective-C wrapper build/install

* Add Swift wrappers for videoio/objdetect/feature2d

* Framework build;iOS support

* Fix toArray functions;Use enum types whenever possible

* Use enum types where possible;prepare test build

* Update test

* Add test runner scripts for iOS and macOS

* Add test scripts and samples

* Build fixes

* Fix build (cmake 3.17.x compatibility)

* Fix warnings

* Fix enum name conflicting handling

* Add support for document generation with Jazzy

* Swift/Native fast accessor functions

* Add Objective-C wrapper for calib3d, dnn, ml, photo and video modules

* Remove IntOut/FloatOut/DoubleOut classes

* Fix iOS default test platform value

* Fix samples

* Revert default framework name to opencv2

* Add converter util functions

* Fix failing test

* Fix whitespace

* Add handling for deprecated methods;fix warnings;define __OPENCV_BUILD

* Suppress cmake warnings

* Reduce severity of "jazzy not found" log message

* Fix incorrect #include of compatibility header in ios.h

* Use explicit returns in subscript/get implementation

* Reduce minimum required cmake version to 3.15 for Objective-C/Swift binding
2020-06-08 18:32:53 +00:00
Alexander Alekhin
b03ed532cf Merge pull request #17474 from komakai:ndk-side-by-side 2020-06-05 10:37:48 +00:00
Alexander Alekhin
7722a2b8a8 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-06-04 17:58:34 +00:00
Giles Payne
977e5afbac Add handling for Android "NDK (Side by side)" 2020-06-04 21:13:11 +09:00
Alexander Alekhin
11ac2e1475 build: winpack_dldt with dldt 2020.3.0
https://github.com/openvinotoolkit/openvino/releases/tag/2020.3.0
2020-06-04 01:21:16 +00:00
Alexander Alekhin
1d30a524fa Merge pull request #17145 from asmorkalov:as/riscv 2020-04-28 10:41:41 +00:00
Alexander Smorkalov
7228d2a824 Added initial version of cmake toolchain for RISC-V architecture. 2020-04-27 12:42:38 +03:00
Alexander Alekhin
81c2f3d194 Merge pull request #17081 from alalek:backport_17056 2020-04-15 18:33:41 +00:00
Alexander Alekhin
ff4ce9f7b1 build: winpack_dldt with dldt 2020.2 2020-04-15 17:25:23 +00:00
Alexander Alekhin
fecebea2e3 Merge pull request #17056 from alalek:build_opencv_winpack_dldt_2020.2 2020-04-15 17:24:34 +00:00
Alexander Alekhin
07a0274507 build: winpack_dldt with dldt 2020.2 2020-04-15 05:19:49 +00:00
Alexander Alekhin
ca9756f6a1 Merge remote-tracking branch 'upstream/3.4' into merge-3.4 2020-04-13 20:00:12 +00:00