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 authored and Brad King committed 2013-05-08 11:45:34 -04:00
1 parent ff298fff79
commit 778aacc864
1 file changed
+1 -1
+1 -1
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 ":")