diff options
author | Tristan Partin <tristan@partin.io> | 2021-01-20 21:46:55 -0600 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2021-04-12 10:43:11 -0700 |
commit | 4c13aa30a1714b1fdbebb465f4621f332e241505 (patch) | |
tree | bf6d41521b02a024a8cd24cf10ef75e57d38a57d /docs | |
parent | 50cf8bcabaa2a9b1ae37c071c7c5f4afd47af4d0 (diff) | |
download | meson-4c13aa30a1714b1fdbebb465f4621f332e241505.zip meson-4c13aa30a1714b1fdbebb465f4621f332e241505.tar.gz meson-4c13aa30a1714b1fdbebb465f4621f332e241505.tar.bz2 |
dependency: Add JDK system dependency
The JDK system dependency is important for detecting JDK include paths
that may be useful when developing a JNI interface.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/markdown/Machine-files.md | 1 | ||||
-rw-r--r-- | docs/markdown/snippets/jdk-system-dependency.md | 16 |
2 files changed, 17 insertions, 0 deletions
diff --git a/docs/markdown/Machine-files.md b/docs/markdown/Machine-files.md index 39e02a6..6c0b051 100644 --- a/docs/markdown/Machine-files.md +++ b/docs/markdown/Machine-files.md @@ -236,6 +236,7 @@ section. `exe_wrapper` specified in `[binaries]` to run generated executables in CMake subprojects. This setting has no effect if the `exe_wrapper` was not specified. The default value is `true`. (*new in 0.56.0*) +- `java_home` is an absolute path pointing to the root of a Java installation. ### CMake variables diff --git a/docs/markdown/snippets/jdk-system-dependency.md b/docs/markdown/snippets/jdk-system-dependency.md new file mode 100644 index 0000000..bccd16e --- /dev/null +++ b/docs/markdown/snippets/jdk-system-dependency.md @@ -0,0 +1,16 @@ +## JDK System Dependency + +When building projects such as those interacting with the JNI, you need access +to a few header files located in a Java installation. This system dependency +will add the correct include paths to your target. It assumes that either +`JAVA_HOME` will be set to a valid Java installation, or the default `javac` on +your system is a located in the `bin` directory of a Java installation. Note: +symlinks are resolved. + +```meson +jdk = dependency('jdk', version : '>=1.8') +``` + +Currently this system dependency only works on `linux`, `win32`, and `darwin`. +This can easily be extended given the correct information about your compiler +and platform in an issue. |