Skip to content

Commit 83acfc9

Browse files
authored
Merge pull request #368 from tedski/master
Disable Java wrapper build by default.
2 parents 914404d + 61a4bf2 commit 83acfc9

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

Diff for: README.md

+1
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.

Diff for: setup.py

+3
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)