Mercurial > hg > orthanc-java
comparison Plugin/CMakeLists.txt @ 43:678bbed285a1 default tip
improved import of JNI in cmake
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Fri, 06 Sep 2024 13:53:54 +0200 |
parents | 4faec1378b89 |
children |
comparison
equal
deleted
inserted
replaced
42:b04559283a1d | 43:678bbed285a1 |
---|---|
73 else() | 73 else() |
74 if (NOT USE_SYSTEM_JNI) | 74 if (NOT USE_SYSTEM_JNI) |
75 message(FATAL_ERROR "Cannot statically link against JNI on this platform") | 75 message(FATAL_ERROR "Cannot statically link against JNI on this platform") |
76 endif() | 76 endif() |
77 | 77 |
78 include(FindJNI) | 78 find_package(JNI REQUIRED COMPONENTS JVM) |
79 if (NOT JNI_FOUND) | 79 if (NOT JNI_FOUND) |
80 message(FATAL_ERROR "Unable to find JNI") | 80 message(FATAL_ERROR "Unable to find JNI") |
81 endif() | 81 endif() |
82 | 82 |
83 link_libraries(${JNI_LIBRARIES}) | 83 link_libraries(${JNI_LIBRARIES}) |