[trunk] Fix java binding installation

This commit is contained in:
Mathieu Malaterre 2012-10-22 10:41:44 +00:00
parent 9b2897ccd9
commit f2808de855
2 changed files with 17 additions and 0 deletions

View File

@ -125,6 +125,14 @@ if(NOT OPENJPEG_INSTALL_DOC_DIR)
set(OPENJPEG_INSTALL_DOC_DIR "share/doc/${OPENJPEG_INSTALL_SUBDIR}")
endif()
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

View File

@ -35,6 +35,11 @@ if(UNIX)
target_link_libraries(openjpegjni m)
endif()
install(TARGETS openjpegjni
EXPORT OpenJPEGTargets
LIBRARY DESTINATION ${OPENJPEG_INSTALL_JNI_DIR} COMPONENT Libraries
)
# build jar:
find_package(Java 1.5 REQUIRED) # javac, jar
@ -59,3 +64,7 @@ add_custom_target(OpenJPEGJavaJar ALL
DEPENDS ${LIBRARY_OUTPUT_PATH}/openjpeg.jar
COMMENT "building openjpeg.jar"
)
install(FILES ${LIBRARY_OUTPUT_PATH}/openjpeg.jar
DESTINATION ${OPENJPEG_INSTALL_SHARE_DIR} COMPONENT JavaModule
)