Skip to content

Fix ant/Java detection in cmake scripts#694

Merged
opencv-pushbot merged 1 commit intoopencv:masterfrom
mistydemeo:fix_java_detection
Mar 29, 2013
Merged

Fix ant/Java detection in cmake scripts#694
opencv-pushbot merged 1 commit intoopencv:masterfrom
mistydemeo:fix_java_detection

Conversation

@mistydemeo
Copy link
Copy Markdown
Contributor

Mac OS X 10.7 and newer don't come with Java installed. They do
include some stub binaries, which ask the user if they want to
install Java when run.

OpenCV's cmake script just checks for the existence of an ant
binary and assumes that Java's available if ant is. As a result,
cmake will configure the build to use Java and it will fail once
it tries to compile the Java bindings.

This fixes the issue by checking for the exit status of
ant -version - it exits 0 if Java is installed, or 1
otherwise.

Mac OS X 10.7 and newer don't come with Java installed. They do
include some stub binaries, which ask the user if they want to
install Java when run.

OpenCV's cmake script just checks for the existence of an ant
binary and assumes that Java's available if ant is. As a result,
cmake will configure the build to use Java and it will fail once
it tries to compile the Java bindings.

This fixes the issue by checking for the exit status of
`ant -version` - it exits 0 if Java is installed, or 1
otherwise.
@Daniil-Osokin
Copy link
Copy Markdown

The issue has been reported: http://code.opencv.org/issues/2903

@ghost ghost assigned taka-no-me Mar 23, 2013
@Daniil-Osokin
Copy link
Copy Markdown

@taka-no-me Andrey, please, review this request.

@taka-no-me
Copy link
Copy Markdown

👍

@opencv-pushbot opencv-pushbot merged commit a423afd into opencv:master Mar 29, 2013
savuor pushed a commit to nickyu-zhu/opencv that referenced this pull request Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants