mirror of
https://github.com/opencv/opencv.git
synced 2024-11-27 20:50:25 +08:00
configure desktop Java install, making JNI library name correct, and making it fat when possible
This commit is contained in:
parent
716e0192b3
commit
b337d84adf
@ -158,7 +158,7 @@ OCV_OPTION(BUILD_PERF_TESTS "Build performance tests"
|
||||
OCV_OPTION(BUILD_TESTS "Build accuracy & regression tests" ON IF (NOT IOS) )
|
||||
OCV_OPTION(BUILD_WITH_DEBUG_INFO "Include debug info into debug libs (not MSCV only)" ON )
|
||||
OCV_OPTION(BUILD_WITH_STATIC_CRT "Enables use of staticaly linked CRT for staticaly linked OpenCV" ON IF MSVC )
|
||||
OCV_OPTION(BUILD_FAT_JAVA_LIB "Create fat java wrapper containing the whole OpenCV library" ON IF ANDROID AND NOT BUILD_SHARED_LIBS AND CMAKE_COMPILER_IS_GNUCXX )
|
||||
OCV_OPTION(BUILD_FAT_JAVA_LIB "Create fat java wrapper containing the whole OpenCV library" ON IF NOT BUILD_SHARED_LIBS AND CMAKE_COMPILER_IS_GNUCXX )
|
||||
OCV_OPTION(BUILD_ANDROID_SERVICE "Build OpenCV Manager for Google Play" OFF IF ANDROID AND ANDROID_SOURCE_TREE )
|
||||
OCV_OPTION(BUILD_ANDROID_PACKAGE "Build platform-specific package for Google Play" OFF IF ANDROID )
|
||||
|
||||
|
@ -257,6 +257,13 @@ else(ANDROID)
|
||||
DEPENDS ${step3_depends}
|
||||
COMMENT "Generating ${JAR_NAME}"
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
set(JAR_INSTALL_DIR java)
|
||||
else(WIN32)
|
||||
set(JAR_INSTALL_DIR share/OpenCV/java)
|
||||
endif(WIN32)
|
||||
install(FILES ${JAR_FILE} DESTINATION ${JAR_INSTALL_DIR} COMPONENT main)
|
||||
endif(ANDROID)
|
||||
|
||||
# step 5: build native part
|
||||
@ -291,7 +298,8 @@ endif()
|
||||
|
||||
# Additional target properties
|
||||
set_target_properties(${the_module} PROPERTIES
|
||||
OUTPUT_NAME "${the_module}"
|
||||
OUTPUT_NAME "${the_module}${OPENCV_DLLVERSION}"
|
||||
DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
|
||||
ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
|
||||
RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
|
||||
INSTALL_NAME_DIR ${OPENCV_LIB_INSTALL_PATH}
|
||||
@ -308,9 +316,15 @@ if(ENABLE_SOLUTION_FOLDERS)
|
||||
set_target_properties(${the_module} PROPERTIES FOLDER "bindings")
|
||||
endif()
|
||||
|
||||
if(ANDROID)
|
||||
install(TARGETS ${the_module}
|
||||
LIBRARY DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT main
|
||||
ARCHIVE DESTINATION ${OPENCV_LIB_INSTALL_PATH} COMPONENT main)
|
||||
else()
|
||||
install(TARGETS ${the_module}
|
||||
RUNTIME DESTINATION ${JAR_INSTALL_DIR} COMPONENT main
|
||||
LIBRARY DESTINATION ${JAR_INSTALL_DIR} COMPONENT main)
|
||||
endif()
|
||||
|
||||
######################################################################################################################################
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user