summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt8
-rw-r--r--wrapping/java/openjp2/CMakeLists.txt9
2 files changed, 17 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index be5a6ae0..a6a7e03e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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
diff --git a/wrapping/java/openjp2/CMakeLists.txt b/wrapping/java/openjp2/CMakeLists.txt
index e4d3a407..a0271a1d 100644
--- a/wrapping/java/openjp2/CMakeLists.txt
+++ b/wrapping/java/openjp2/CMakeLists.txt
@@ -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
+)