From 5003b0d7f0d43289d0883115b6c900bb5c5dfbec Mon Sep 17 00:00:00 2001 From: Robin Linden Date: Fri, 7 Jan 2022 19:30:53 +0100 Subject: [PATCH] Only require jni.h to be found when searching for the JNI 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 --- .cirrus.yml | 2 +- cpp/CMakeLists.txt | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.cirrus.yml b/.cirrus.yml index 37626cc57..5adbd675b 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -1,7 +1,7 @@ --- cirrus-ci_task: container: - image: toxchat/toktok-stack:0.0.23-third_party + image: toxchat/toktok-stack:0.0.31-release cpu: 2 memory: 6G configure_script: diff --git a/cpp/CMakeLists.txt b/cpp/CMakeLists.txt index a7bfcf5ac..3d581b96e 100644 --- a/cpp/CMakeLists.txt +++ b/cpp/CMakeLists.txt @@ -40,8 +40,8 @@ find_package(Protobuf REQUIRED) include_directories(${PROTOBUF_INCLUDE_DIRS}) find_package(JNI) -if(JNI_FOUND) - include_directories(${JNI_INCLUDE_DIRS}) +if(JAVA_INCLUDE_PATH) + include_directories(${JAVA_INCLUDE_PATH}) endif() include_directories("src")