From 48550732bf122aac1bb35af3f8db8691f697ebcc Mon Sep 17 00:00:00 2001
From: Dan Liew <daniel.liew@imperial.ac.uk>
Date: Mon, 18 Apr 2016 11:18:47 +0100
Subject: [PATCH] [CMake] Add a few notes on finding the Java installation.

---
 README-CMake.md | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/README-CMake.md b/README-CMake.md
index dd50c05fa..ca3ded9fb 100644
--- a/README-CMake.md
+++ b/README-CMake.md
@@ -290,6 +290,23 @@ Example
 
 ```
 cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_TRACING=FALSE ../
+
+```
+
+## Z3 API Bindings
+
+Z3 exposes various language bindings for its API. Below are some notes on building
+and/or installing these bindings when building Z3 with CMake.
+
+### Java bindings
+
+The CMake build uses the ``FindJava`` and ``FindJNI`` cmake modules to detect the
+installation of Java. If CMake fails to find your installation of Java set the
+``JAVA_HOME`` environment variable when invoking CMake so that it points at the
+correct location. For example
+
+```
+JAVA_HOME=/usr/lib/jvm/default cmake -DBUILD_JAVA_BINDINGS=ON ../
 ```
 
 ## Developer/packager notes