UseJava: create_javadoc does not work on Windows if classpath is specified
I have looked at issue 14321 and it is an unrelated issue.
The problem here is that the path separator used in the classpath in create_javadoc
is always :
(instead of :
on Linux and ;
on Windows).
In this case, a simple example could be:
create_javadoc(MyJavaDoc
FILES
com/mycompany/myjavadoc/*.java
CLASSPATH
myjar1.jar
myjar2.jar
INSTALLPATH
bin64
)
This produces: C:\path\to\javadoc.exe -d C:/.../MyJavaDoc -classpath C:/.../myjar1.jar:C:/.../myjar2.jar C:/.../com/mycompany/myjavadoc/*.java
(note the problem being the :
: C:/.../myjar1.jar:C:/.../myjar2.jar
).
In the code, on line 500 (inside add_jar
) there is a check to set the correct path separator CMAKE_JAVA_INCLUDE_FLAG_SEP
. The code on line 1212 (inside create_javadoc
) this check is missing, and the :
Linux path separator is hardcoded to be used on all platforms.
Edited by Brad King