Allow using Java in a cross-compilation toolchain

Since Java is a portable language, if you want to use Java when
cross-compiling, UseJava uses the JVM installed on the host.  So in this
case, we must use set CMAKE_JAVA_INCLUDE_FLAG_SEP for the current host.
This commit is contained in:
Gregoire Lejeune 2012-05-29 22:23:15 +02:00 committed by Brad King
parent ff298fff79
commit 778aacc864
1 changed files with 1 additions and 1 deletions

View File

@ -242,7 +242,7 @@ function(add_jar _TARGET_NAME)
${CMAKE_JAVA_LIBRARY_OUTPUT_PATH}
)
if (WIN32 AND NOT CYGWIN)
if (WIN32 AND NOT CYGWIN AND CMAKE_HOST_SYSTEM_NAME MATCHES "Windows")
set(CMAKE_JAVA_INCLUDE_FLAG_SEP ";")
else ()
set(CMAKE_JAVA_INCLUDE_FLAG_SEP ":")