[1.5] Fix Java binding issues.
Properly link to math lib on UNIX Make JNI install location a user configuration Remove SONAME property from the java module
This commit is contained in:
parent
75175b715c
commit
15488c94d2
|
@ -136,6 +136,14 @@ IF(NOT OPENJPEG_INSTALL_DOC_DIR)
|
|||
SET(OPENJPEG_INSTALL_DOC_DIR "share/doc/${OPENJPEG_INSTALL_SUBDIR}")
|
||||
ENDIF(NOT OPENJPEG_INSTALL_DOC_DIR)
|
||||
|
||||
if(NOT OPENJPEG_INSTALL_JNI_DIR)
|
||||
if(WIN32)
|
||||
set(OPENJPEG_INSTALL_JNI_DIR ${OPENJPEG_INSTALL_BIN_DIR})
|
||||
else()
|
||||
set(OPENJPEG_INSTALL_JNI_DIR ${OPENJPEG_INSTALL_LIB_DIR})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
IF(NOT OPENJPEG_INSTALL_PACKAGE_DIR)
|
||||
# We could install *.cmake files in share/ however those files contains
|
||||
# hardcoded path to libraries on a multi-arch system (fedora/debian) those
|
||||
|
|
|
@ -24,13 +24,14 @@ include_directories(
|
|||
add_library(openjpegjni MODULE
|
||||
${openjpegjni_SRCS}
|
||||
)
|
||||
# Java module should not have a SONAME:
|
||||
set_property(TARGET openjpegjni PROPERTY NO_SONAME 1)
|
||||
|
||||
TARGET_LINK_LIBRARIES(openjpegjni ${OPENJPEG_LIBRARY_NAME})
|
||||
|
||||
IF(WIN32)
|
||||
SET(OPENJPEG_INSTALL_JNI_DIR ${OPENJPEG_INSTALL_BIN_DIR})
|
||||
ELSE()
|
||||
SET(OPENJPEG_INSTALL_JNI_DIR ${OPENJPEG_INSTALL_LIB_DIR})
|
||||
ENDIF()
|
||||
if(UNIX)
|
||||
target_link_libraries(openjpegjni m)
|
||||
endif()
|
||||
|
||||
INSTALL(TARGETS openjpegjni
|
||||
EXPORT OpenJPEGTargets
|
||||
|
|
Loading…
Reference in New Issue