summaryrefslogtreecommitdiffstats
path: root/Modules/UseJava.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/UseJava.cmake')
-rw-r--r--Modules/UseJava.cmake44
1 files changed, 32 insertions, 12 deletions
diff --git a/Modules/UseJava.cmake b/Modules/UseJava.cmake
index bbd469e..a5f8a08 100644
--- a/Modules/UseJava.cmake
+++ b/Modules/UseJava.cmake
@@ -36,17 +36,21 @@ compiling the java sources and also to the dependencies of the target.
For backwards compatibility, jar files listed as sources are ignored (as
they have been since the first version of this module).
+.. versionadded:: 3.4
+ Support fot response files (prefixed by ``@``) in the ``SOURCES`` list.
+
The default ``OUTPUT_DIR`` can also be changed by setting the variable
``CMAKE_JAVA_TARGET_OUTPUT_DIR``.
-Optionally, using option ``GENERATE_NATIVE_HEADERS``, native header files can
-be generated for methods declared as native. These files provide the
-connective glue that allow your Java and C code to interact. An INTERFACE
-target will be created for an easy usage of generated files. Sub-option
-``DESTINATION`` can be used to specify the output directory for generated
-header files.
+.. versionadded:: 3.11
+ Optionally, using option ``GENERATE_NATIVE_HEADERS``, native header files can
+ be generated for methods declared as native. These files provide the
+ connective glue that allow your Java and C code to interact. An INTERFACE
+ target will be created for an easy usage of generated files. Sub-option
+ ``DESTINATION`` can be used to specify the output directory for generated
+ header files.
-``GENERATE_NATIVE_HEADERS`` option requires, at least, version 1.8 of the JDK.
+ ``GENERATE_NATIVE_HEADERS`` option requires, at least, version 1.8 of the JDK.
The ``add_jar()`` function sets the following target properties on
``<target_name>``:
@@ -77,6 +81,9 @@ described above, and is used by ``install_jar_exports()``. You can get this
information with :command:`get_property` and the ``INSTALL_DESTINATION``
property key.
+.. versionadded:: 3.4
+ The second signature with ``DESTINATION`` and ``COMPONENT`` options.
+
.. code-block:: cmake
install_jni_symlink(<target_name> <destination>)
@@ -86,6 +93,14 @@ This command installs the ``<target_name>`` JNI symlinks to the given
``<destination>``. It should be called in the same scope as ``add_jar()`` or
it will fail.
+.. versionadded:: 3.4
+ The second signature with ``DESTINATION`` and ``COMPONENT`` options.
+
+Exporting JAR Targets
+^^^^^^^^^^^^^^^^^^^^^
+
+.. versionadded:: 3.7
+
.. code-block:: cmake
install_jar_exports(TARGETS <jars>...
@@ -97,6 +112,9 @@ This command installs a target export file ``<filename>`` for the named jar
targets to the given ``<destination>`` directory. Its function is similar to
that of :command:`install(EXPORTS)`.
+.. versionadded:: 3.9
+ The ``NAMESPACE`` option.
+
.. code-block:: cmake
export_jars(TARGETS <jars>...
@@ -106,6 +124,9 @@ that of :command:`install(EXPORTS)`.
This command writes a target export file ``<filename>`` for the named ``<jars>``
targets. Its function is similar to that of :command:`export`.
+.. versionadded:: 3.9
+ The ``NAMESPACE`` option.
+
Examples
""""""""
@@ -316,17 +337,16 @@ Header Generation
[OUTPUT_NAME <path>|OUTPUT_DIR <path>]
)
-Create C header files from java classes. These files provide the connective glue
-that allow your Java and C code to interact.
+.. versionadded:: 3.4
.. deprecated:: 3.11
-
-.. note::
-
This command will no longer be supported starting with version 10 of the JDK
due to the `suppression of javah tool <http://openjdk.java.net/jeps/313>`_.
The ``add_jar(GENERATE_NATIVE_HEADERS)`` command should be used instead.
+Create C header files from java classes. These files provide the connective glue
+that allow your Java and C code to interact.
+
There are two main signatures for ``create_javah()``. The first signature
returns generated files through variable specified by the ``GENERATED_FILES``
option. For example: