mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-07 07:31:58 +08:00
Skip JNI library compile if Java not found
This commit is contained in:
@@ -4,7 +4,7 @@ cmake_minimum_required (VERSION 2.6)
|
|||||||
|
|
||||||
find_package(JNI REQUIRED)
|
find_package(JNI REQUIRED)
|
||||||
|
|
||||||
|
if (${JNI_FOUND} MATCHES "TRUE")
|
||||||
include_directories(
|
include_directories(
|
||||||
../../openalpr/
|
../../openalpr/
|
||||||
${JAVA_INCLUDE_PATH}
|
${JAVA_INCLUDE_PATH}
|
||||||
@@ -23,3 +23,7 @@ TARGET_LINK_LIBRARIES(openalprjni openalpr)
|
|||||||
|
|
||||||
|
|
||||||
install (TARGETS openalprjni DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
|
install (TARGETS openalprjni DESTINATION ${CMAKE_INSTALL_PREFIX}/lib)
|
||||||
|
else()
|
||||||
|
MESSAGE("JAVA JNI library not found, skipping openalprjni compilation")
|
||||||
|
|
||||||
|
endif()
|
Reference in New Issue
Block a user