If there is no java compiler report error on ADD_JAVA_LIBRARY
This commit is contained in:
parent
c073a094ed
commit
fc52954023
|
@ -6,6 +6,7 @@ SET(CMAKE_JAVA_RUNTIME_LOADED 1)
|
|||
SET(CMAKE_JAVA_ARCHIVE_LOADED 1)
|
||||
|
||||
MACRO(ADD_JAVA_LIBRARY LIBRARYNAME SOURCES)
|
||||
IF(CMAKE_JAVA_COMPILER AND CMAKE_JAVA_ARCHIVE)
|
||||
SET(CMAKE_JAVA_INCLUDE_PATH ${CMAKE_JAVA_INCLUDE_PATH}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
|
@ -59,4 +60,7 @@ MACRO(ADD_JAVA_LIBRARY LIBRARYNAME SOURCES)
|
|||
ADD_CUSTOM_COMMAND(SOURCE ${LIBRARYNAME}_target
|
||||
TARGET ${LIBRARYNAME}_target
|
||||
DEPENDS ${CMAKE_JAVA_LIBRARY_OUTPUT_PATH}/${LIBRARYNAME}.jar)
|
||||
ELSE(CMAKE_JAVA_COMPILER AND CMAKE_JAVA_ARCHIVE)
|
||||
MESSAGE(SEND_ERROR "Java compiler and/or Java archiver not found")
|
||||
ENDIF(CMAKE_JAVA_COMPILER AND CMAKE_JAVA_ARCHIVE)
|
||||
ENDMACRO(ADD_JAVA_LIBRARY LIBRARYNAME SOURCES)
|
Loading…
Reference in New Issue