By default, openjpip client can still built even without java compiler. Print a message to the user as warning.

This commit is contained in:
Mathieu Malaterre 2012-02-13 11:41:31 +00:00
parent 07521a5dc2
commit a9b7c7b0b4
1 changed files with 71 additions and 66 deletions

View File

@ -47,8 +47,10 @@ FOREACH(exe ${EXES})
ENDFOREACH(exe) ENDFOREACH(exe)
# Build the two java clients: # Build the two java clients:
FIND_PACKAGE(Java 1.5 REQUIRED) # javac, jar FIND_PACKAGE(Java 1.5 COMPONENTS Development) # javac, jar
# Only build the java viewer if dev is found:
if(Java_Development_FOUND)
# 1. opj_viewer # 1. opj_viewer
# build dep list: # build dep list:
file(GLOB java1_srcs "opj_viewer/src/*.java") file(GLOB java1_srcs "opj_viewer/src/*.java")
@ -125,3 +127,6 @@ if(EXISTS ${APACHE_XERCES_JAR})
COMMENT "building opj_viewer_xerces.jar" COMMENT "building opj_viewer_xerces.jar"
) )
endif() endif()
else(Java_Development_FOUND)
message(WARNING "No java compiler found. Wont be able to build java viewer")
endif()