build.xml.in 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. <!-- This is an Apache Ant build file. As part of the desktop java build -->
  2. <!-- process, this config is used to package the autogenerated .java -->
  3. <!-- interface files into OpenCV.jar -->
  4. <project name="OpenCV">
  5. <tstamp>
  6. <format property="timestamp" pattern="EEE MMM d yyyy HH:mm:ss z"/>
  7. </tstamp>
  8. <target name="jar">
  9. <!-- This is to make a jar with a source attachment, for e.g. easy -->
  10. <!-- navigation in Eclipse. See this question: -->
  11. <!-- http://stackoverflow.com/questions/3584968/ant-how-to-compile-jar-that-includes-source-attachment -->
  12. <javac sourcepath="" srcdir="java" destdir="build/classes" debug="on" includeantruntime="false" @OPENCV_ANT_JAVAC_EXTRA_ATTRS@ >
  13. <include name="**/*.java"/>
  14. <compilerarg line="-encoding utf-8"/>
  15. </javac>
  16. <jar destfile="@OPENCV_JAR_FILE@">
  17. <fileset dir="java"/>
  18. <fileset dir="build/classes"/>
  19. <manifest>
  20. <attribute name="Specification-Title" value="OpenCV"/>
  21. <attribute name="Specification-Version" value="@OPENCV_VERSION@"/>
  22. <attribute name="Implementation-Title" value="OpenCV"/>
  23. <attribute name="Implementation-Version" value="@OPENCV_VCSVERSION@"/>
  24. <attribute name="Implementation-Date" value="${timestamp}"/>
  25. <attribute name="Automatic-Module-Name" value="org.opencv"/>
  26. </manifest>
  27. </jar>
  28. </target>
  29. <target name="javadoc">
  30. <copy file="@OpenCV_SOURCE_DIR@/doc/mymath.js"
  31. todir="@OPENCV_JAVADOC_DESTINATION@" />
  32. <!-- synchronize with platforms\android\build_sdk.py -->
  33. <javadoc
  34. packagenames="org.opencv.*"
  35. sourcepath="java"
  36. destdir="@OPENCV_JAVADOC_DESTINATION@"
  37. Windowtitle="OpenCV @OPENCV_VERSION_PLAIN@ Java documentation"
  38. Doctitle="OpenCV Java documentation (@OPENCV_VERSION@)"
  39. bottom="Generated on ${timestamp} / OpenCV @OPENCV_VCSVERSION@"
  40. failonerror="true"
  41. encoding="UTF-8" charset="UTF-8" docencoding="UTF-8"
  42. @CMAKE_CONFIG_OPENCV_JAVADOC_LINK@
  43. additionalparam="--allow-script-in-comments"
  44. >
  45. <bottom>
  46. <![CDATA[
  47. <script>
  48. var url = window.location.href;
  49. var pos = url.lastIndexOf('/javadoc/');
  50. url = pos >= 0 ? (url.substring(0, pos) + '/javadoc/mymath.js') : (window.location.origin + '/mymath.js');
  51. var script = document.createElement('script');
  52. script.setAttribute("src", url);
  53. script.setAttribute("defer", "")
  54. document.head.appendChild(script);
  55. script = document.createElement('script');
  56. script.setAttribute("src", '@OPENCV_MATHJAX_RELPATH@/es5/tex-chtml.js');
  57. script.setAttribute("defer", "")
  58. document.head.appendChild(script);
  59. </script>
  60. ]]>
  61. </bottom>
  62. </javadoc>
  63. </target>
  64. </project>