Before this patch, we would only add the jni.h include path if both JNI
and AWT were found as FindJNI.cmake only sets JNI_FOUND if both JNI and
AWT were found, requiring you to install openjdk-11-jdk instead of
openjdk-11-jdk-headless for the build to succeed.
After this patch both the headless and the full jdk is fine.
Before this patch, we would only add the jni.h include path if both JNI and AWT were found as FindJNI.cmake only sets JNI_FOUND if both JNI and AWT were found, requiring you to install openjdk-11-jdk instead of openjdk-11-jdk-headless for the build to succeed.
After this patch both the headless and the full jdk is fine.
See: https://cmake.org/cmake/help/v3.22/module/FindJNI.html
This change is