mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-06 04:03:27 +03:00
UseJava: Fix classpath separator on WIN32 cross compilation (#15206)
The condition to use ";" as classpath separator includes a check for the switch "WIN32" which is a target switch. When cross-compiling for a non-windows target, this switch is not present and the separator defaults to ":". It should check for "CMAKE_HOST_WIN32" instead.
This commit is contained in:
1 parent
c113efa703
commit
7a373d5e55
1 file changed
+1
-1
@@ -398,7 +398,7 @@ function(add_jar _TARGET_NAME)
|
||||
${CMAKE_JAVA_LIBRARY_OUTPUT_PATH}
|
||||
)
|
||||
|
||||
if (WIN32 AND NOT CYGWIN AND CMAKE_HOST_SYSTEM_NAME MATCHES "Windows")
|
||||
if (CMAKE_HOST_WIN32 AND NOT CYGWIN AND CMAKE_HOST_SYSTEM_NAME MATCHES "Windows")
|
||||
set(CMAKE_JAVA_INCLUDE_FLAG_SEP ";")
|
||||
else ()
|
||||
set(CMAKE_JAVA_INCLUDE_FLAG_SEP ":")
|
||||
|
||||
Reference in new issue
Block a user