[1.5] install java module

This commit is contained in:
Mathieu Malaterre 2012-04-19 10:37:31 +00:00
parent 5379ec5715
commit 4e8aea6b5a
1 changed files with 15 additions and 0 deletions

View File

@ -21,6 +21,17 @@ add_library(openjpegjni MODULE
${openjpegjni_SRCS}
)
IF(WIN32)
SET(OPENJPEG_INSTALL_JNI_DIR ${OPENJPEG_INSTALL_BIN_DIR})
ELSE()
SET(OPENJPEG_INSTALL_JNI_DIR ${OPENJPEG_INSTALL_LIB_DIR})
ENDIF()
INSTALL(TARGETS openjpegjni
EXPORT OpenJPEGTargets
LIBRARY DESTINATION ${OPENJPEG_INSTALL_JNI_DIR} COMPONENT Libraries
)
# build jar:
FIND_PACKAGE(Java 1.5 REQUIRED) # javac, jar
@ -45,3 +56,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_LIB_DIR} COMPONENT JavaModule
)