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:
parent
ff298fff79
commit
778aacc864
|
@ -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 ":")
|
||||
|
|
Loading…
Reference in New Issue