build.xml.in 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. </manifest>
  26. </jar>
  27. </target>
  28. <target name="javadoc">
  29. <copy file="@OpenCV_SOURCE_DIR@/doc/mymath.js"
  30. todir="@OPENCV_JAVADOC_DESTINATION@" />
  31. <!-- synchronize with platforms\android\build_sdk.py -->
  32. <javadoc
  33. packagenames="org.opencv.*"
  34. sourcepath="java"
  35. destdir="@OPENCV_JAVADOC_DESTINATION@"
  36. Windowtitle="OpenCV @OPENCV_VERSION_PLAIN@ Java documentation"
  37. Doctitle="OpenCV Java documentation (@OPENCV_VERSION@)"
  38. bottom="Generated on ${timestamp} / OpenCV @OPENCV_VCSVERSION@"
  39. failonerror="true"
  40. encoding="UTF-8" charset="UTF-8" docencoding="UTF-8"
  41. @CMAKE_CONFIG_OPENCV_JAVADOC_LINK@
  42. additionalparam="--allow-script-in-comments"
  43. >
  44. <Header>
  45. <![CDATA[
  46. <script>
  47. var url = window.location.href;
  48. var pos = url.lastIndexOf('/javadoc/');
  49. url = pos >= 0 ? (url.substring(0, pos) + '/javadoc/mymath.js') : (window.location.origin + '/mymath.js');
  50. var script = document.createElement('script');
  51. script.src = '@OPENCV_MATHJAX_RELPATH@/MathJax.js?config=TeX-AMS-MML_HTMLorMML,' + url;
  52. document.getElementsByTagName('head')[0].appendChild(script);
  53. </script>
  54. ]]>
  55. </Header>
  56. </javadoc>
  57. </target>
  58. </project>