Skip to content

Commit 5003b0d

Browse files
committed
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
1 parent e729f6a commit 5003b0d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

.cirrus.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
cirrus-ci_task:
33
container:
4-
image: toxchat/toktok-stack:0.0.23-third_party
4+
image: toxchat/toktok-stack:0.0.31-release
55
cpu: 2
66
memory: 6G
77
configure_script:

cpp/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ find_package(Protobuf REQUIRED)
4040
include_directories(${PROTOBUF_INCLUDE_DIRS})
4141

4242
find_package(JNI)
43-
if(JNI_FOUND)
44-
include_directories(${JNI_INCLUDE_DIRS})
43+
if(JAVA_INCLUDE_PATH)
44+
include_directories(${JAVA_INCLUDE_PATH})
4545
endif()
4646

4747
include_directories("src")

0 commit comments

Comments
 (0)