summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Malaterre <mathieu.malaterre@gmail.com>2011-12-02 14:52:34 +0000
committerMathieu Malaterre <mathieu.malaterre@gmail.com>2011-12-02 14:52:34 +0000
commitd7388d7e80b8d18090feca89c67e38a5d190fcbd (patch)
treef6acd9434863fc3746791c14384fd5e8dc54bd91
parent5c363b76eeeea843967103f839d2ef68c8cc2499 (diff)
Add CPack stuff
-rw-r--r--CHANGES3
-rw-r--r--CMake/OpenJPEGCPack.cmake23
-rw-r--r--CMakeLists.txt2
3 files changed, 28 insertions, 0 deletions
diff --git a/CHANGES b/CHANGES
index 2e81110f..39f35838 100644
--- a/CHANGES
+++ b/CHANGES
@@ -5,6 +5,9 @@ What's New for OpenJPEG
! : changed
+ : added
+December 2, 2011
++ [mathieu] Adding CPack mechanism
+
December 1, 2011
* [mickael] fix a bug during the creation of the codestream index
* [mickael] fix a warning about a recent commit (1104)
diff --git a/CMake/OpenJPEGCPack.cmake b/CMake/OpenJPEGCPack.cmake
new file mode 100644
index 00000000..e3cc5f4c
--- /dev/null
+++ b/CMake/OpenJPEGCPack.cmake
@@ -0,0 +1,23 @@
+# package bundler
+if(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
+ if(EXISTS "${CMAKE_ROOT}/Modules/InstallRequiredSystemLibraries.cmake")
+ set(CMAKE_INSTALL_MFC_LIBRARIES 0)
+ set(CMAKE_INSTALL_DEBUG_LIBRARIES 0)
+ include(${CMAKE_ROOT}/Modules/InstallRequiredSystemLibraries.cmake)
+ endif(EXISTS "${CMAKE_ROOT}/Modules/InstallRequiredSystemLibraries.cmake")
+
+ set(OPJ_PACKAGE_DESCRIPTION_SUMMARY "OpenJPEG - OpenJPEG a JPEG 2000 implementation.")
+ set(OPJ_PACKAGE_CONTACT "openjpeg users <openjpeg@googlegroups.com>")
+
+ set(CPACK_PACKAGE_DESCRIPTION_SUMMARY ${OPJ_PACKAGE_DESCRIPTION_SUMMARY})
+ set(CPACK_PACKAGE_VENDOR "OpenJPEG")
+ set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
+ set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE")
+ set(CPACK_PACKAGE_VERSION_MAJOR "${OPENJPEG_VERSION_MAJOR}")
+ set(CPACK_PACKAGE_VERSION_MINOR "${OPENJPEG_VERSION_MINOR}")
+ set(CPACK_PACKAGE_VERSION_PATCH "${OPENJPEG_VERSION_BUILD}")
+ set(CPACK_PACKAGE_INSTALL_DIRECTORY "OpenJPEG ${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}")
+ set(CPACK_SOURCE_PACKAGE_FILE_NAME "openjpeg-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
+
+ include(CPack)
+endiF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 09a0a100..61b02ee4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -258,3 +258,5 @@ INSTALL(
FILES CHANGES
LICENSE
DESTINATION ${OPENJPEG_INSTALL_DOC_DIR})
+
+INCLUDE (CMake/OpenJPEGCPack.cmake)