Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 61a4bf2

Browse filesBrowse files
author
Ted Strzalkowski
committed
Disable Java wrapper build by default.
- Java wrapper build isn't necessary for all Python builds. - Java wrapper build can now be enabled with ``ENABLE_JAVA`` environment variable.
1 parent 914404d commit 61a4bf2
Copy full SHA for 61a4bf2

File tree

Expand file treeCollapse file tree

2 files changed

+4
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+4
-0
lines changed

‎README.md

Copy file name to clipboardExpand all lines: README.md
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ The build can be customized with environment variables. In addition to any varia
113113

114114
- ``CI_BUILD``. Set to ``1`` to emulate the CI environment build behaviour. Used only in CI builds to force certain build flags on in ``setup.py``. Do not use this unless you know what you are doing.
115115
- ``ENABLE_CONTRIB`` and ``ENABLE_HEADLESS``. Set to ``1`` to build the contrib and/or headless version
116+
- ``ENABLE_JAVA``, Set to ``1`` to enable the Java client build. This is disabled by default.
116117
- ``CMAKE_ARGS``. Additional arguments for OpenCV's CMake invocation. You can use this to make a custom build.
117118

118119
See the next section for more info about manual builds outside the CI environment.

‎setup.py

Copy file name to clipboardExpand all lines: setup.py
+3Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ def main():
1919
minimum_supported_numpy = "1.13.1"
2020
build_contrib = get_build_env_var_by_name("contrib")
2121
build_headless = get_build_env_var_by_name("headless")
22+
build_java = 'ON' if get_build_env_var_by_name("java") else 'OFF'
2223

2324
if sys.version_info[:2] >= (3, 6):
2425
minimum_supported_numpy = "1.13.3"
@@ -121,6 +122,8 @@ def main():
121122
"-DPYTHON3_LIBRARY=%s" % python_lib_path,
122123
"-DBUILD_opencv_python3=ON",
123124
"-DBUILD_opencv_python2=OFF",
125+
# Disable the Java build by default as it is not needed
126+
"-DBUILD_opencv_java=%s" % build_java,
124127
# When off, adds __init__.py and a few more helper .py's. We use our own helper files with a different structure.
125128
"-DOPENCV_SKIP_PYTHON_LOADER=ON",
126129
# Relative dir to install the built module to in the build tree.

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.