[Gdcm-hackers] gdcm-git:Grassroots DICOM branch master updated. 34b73e3212189343d276fbc152ac6eb6b23
Cross-platform DICOM implementation
Brought to you by:
malat
|
From: Mathieu M. <ma...@us...> - 2017-02-01 09:25:08
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Grassroots DICOM".
The branch, master has been updated
via 34b73e3212189343d276fbc152ac6eb6b237ff47 (commit)
from 0b76cd5fc3d205d21b184ddf0005f443242e279c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://sourceforge.net/p/gdcm/gdcm/ci/34b73e3212189343d276fbc152ac6eb6b237ff47/
commit 34b73e3212189343d276fbc152ac6eb6b237ff47
Author: Mathieu Malaterre <mat...@gm...>
Date: Wed Feb 1 10:24:49 2017 +0100
really deprecate openjpeg 1.5.x
diff --git a/Applications/Cxx/gdcmstream.cxx b/Applications/Cxx/gdcmstream.cxx
index 8cc5baf..5e5c6da 100644
--- a/Applications/Cxx/gdcmstream.cxx
+++ b/Applications/Cxx/gdcmstream.cxx
@@ -27,10 +27,10 @@
#include "gdcmUIDGenerator.h"
#include "gdcmVersion.h"
-#ifdef OPENJPEG_MAJOR_VERSION
-#if OPENJPEG_MAJOR_VERSION == 1
+#ifdef OPENJPEG_VERSION_MAJOR
+#if OPENJPEG_VERSION_MAJOR == 1
#include "gdcm_openjpeg.h"
-#elif OPENJPEG_MAJOR_VERSION == 2
+#elif OPENJPEG_VERSION_MAJOR == 2
#define USE_OPJ_DEPRECATED // opj_setup_decoder
#include "gdcm_openjpeg2.h"
#else
diff --git a/CMake/FindOpenJPEG.cmake b/CMake/FindOpenJPEG.cmake
index e48ea86..507ff9b 100644
--- a/CMake/FindOpenJPEG.cmake
+++ b/CMake/FindOpenJPEG.cmake
@@ -22,7 +22,6 @@
find_package(PkgConfig)
pkg_check_modules(OPENJPEG libopenjpeg1)
if(OPENJPEG_FOUND)
- set(OPENJPEG_MAJOR_VERSION 1)
set(OPENJPEG_INCLUDE_DIR ${OPENJPEG_INCLUDE_DIRS})
set(OPENJPEG_LIBRARIES ${OPENJPEG_LDFLAGS})
else()
@@ -31,7 +30,10 @@ find_package(OpenJPEG QUIET NO_MODULE)
mark_as_advanced(OpenJPEG_DIR)
if( NOT OpenJPEG_DIR )
-set(OPENJPEG_MAJOR_VERSION 2) # FIXME ?
+set(OPENJPEG_VERSION_MAJOR 2) # FIXME ?
+set(OPENJPEG_VERSION_MINOR 0) # FIXME ?
+set(OPENJPEG_VERSION_PATCH 0) # FIXME ?
+set(OPENJPEG_VERSION "${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}.${OPENJPEG_VERSION_PATCH}")
find_path(OPENJPEG_INCLUDE_DIR
NAMES openjpeg.h #openjpeg-1.0/openjpeg.h
PATHS /usr/local/include
@@ -43,11 +45,13 @@ find_path(OPENJPEG_INCLUDE_DIR
find_library(OPENJPEG_LIBRARY
NAMES openjpeg
)
-
+endif()
+endif()
include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(OpenJPEG DEFAULT_MSG
+find_package_handle_standard_args(OpenJPEG REQUIRED_VARS
OPENJPEG_LIBRARY
OPENJPEG_INCLUDE_DIR
+ VERSION_VAR OPENJPEG_VERSION
)
if(OPENJPEG_FOUND)
@@ -59,5 +63,3 @@ mark_as_advanced(
OPENJPEG_LIBRARY
OPENJPEG_INCLUDE_DIR
)
-endif()
-endif()
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 08fbadd..ee74980 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -364,10 +364,7 @@ else()
endif()
if(GDCM_USE_SYSTEM_OPENJPEG)
- # For some reason I cannot specify the version I want.
- # find_package(OpenJPEG 2.0 REQUIRED)
- # oh well we should handle both 1.0 and 2.0 anyway...
- find_package(OpenJPEG REQUIRED)
+ find_package(OpenJPEG 2.0 REQUIRED)
set(GDCM_OPENJPEG_LIBRARIES ${OPENJPEG_LIBRARIES})
else()
set(GDCM_OPENJPEG_LIBRARIES gdcmopenjp2)
diff --git a/Source/Common/gdcmConfigure.h.in b/Source/Common/gdcmConfigure.h.in
index 3739fc1..b01444a 100644
--- a/Source/Common/gdcmConfigure.h.in
+++ b/Source/Common/gdcmConfigure.h.in
@@ -63,14 +63,14 @@
#cmakedefine GDCM_USE_SYSTEM_PAPYRUS3
#ifndef GDCM_USE_SYSTEM_OPENJPEG
-#define OPENJPEG_MAJOR_VERSION 2
+#define OPENJPEG_VERSION_MAJOR 2
#else
-#define OPENJPEG_MAJOR_VERSION @OPENJPEG_MAJOR_VERSION@
+#define OPENJPEG_VERSION_MAJOR @OPENJPEG_VERSION_MAJOR@
#endif //GDCM_USE_SYSTEM_OPENJPEG
-#ifndef OPENJPEG_MAJOR_VERSION
+#ifndef OPENJPEG_VERSION_MAJOR
#error problem with openjpeg major version
-#endif // OPENJPEG_MAJOR_VERSION
+#endif // OPENJPEG_VERSION_MAJOR
#cmakedefine GDCM_USE_PVRG
#cmakedefine GDCM_USE_KAKADU
diff --git a/Testing/Source/Data/CMakeLists.txt b/Testing/Source/Data/CMakeLists.txt
index a48513a..7d61b16 100644
--- a/Testing/Source/Data/CMakeLists.txt
+++ b/Testing/Source/Data/CMakeLists.txt
@@ -69,15 +69,6 @@ set(BLACK_LIST_READER
# https://github.com/team-charls/charls/issues/16
JPEG_LS_InvalidEscapeSequence_COM_padding.dcm
)
-if(GDCM_USE_SYSTEM_OPENJPEG)
- if(OPENJPEG_MAJOR_VERSION EQUAL 1)
- set(BLACK_LIST_READER
- ${BLACK_LIST_READER}
- # openjpeg system on travis buildd seems broken
- TOSHIBA_J2K_OpenJPEGv2Regression.dcm
- )
- endif()
-endif()
if(NOT GDCM_USE_PVRG)
set(BLACK_LIST_READER
# The following should really fails according to JPEG spec, IJG is failing and even when forcing
diff --git a/Utilities/gdcmopenjpeg/cmake/OpenJPEGConfig.cmake.in b/Utilities/gdcmopenjpeg/cmake/OpenJPEGConfig.cmake.in
index 6a2f4ba..caf6f2e 100644
--- a/Utilities/gdcmopenjpeg/cmake/OpenJPEGConfig.cmake.in
+++ b/Utilities/gdcmopenjpeg/cmake/OpenJPEGConfig.cmake.in
@@ -6,9 +6,9 @@
# module to load OPENJPEG's settings for an external project.
@OPENJPEG_CONFIG_INSTALL_ONLY@
# The OPENJPEG version number.
-set(OPENJPEG_MAJOR_VERSION "@OPENJPEG_VERSION_MAJOR@")
-set(OPENJPEG_MINOR_VERSION "@OPENJPEG_VERSION_MINOR@")
-set(OPENJPEG_BUILD_VERSION "@OPENJPEG_VERSION_BUILD@")
+set(OPENJPEG_VERSION_MAJOR "@OPENJPEG_VERSION_MAJOR@")
+set(OPENJPEG_VERSION_MINOR "@OPENJPEG_VERSION_MINOR@")
+set(OPENJPEG_VERSION_BUILD "@OPENJPEG_VERSION_BUILD@")
# The libraries.
set(OPENJPEG_LIBRARIES "@OPENJPEG_LIBRARY_NAME@")
-----------------------------------------------------------------------
Summary of changes:
Applications/Cxx/gdcmstream.cxx | 6 +++---
CMake/FindOpenJPEG.cmake | 14 ++++++++------
CMakeLists.txt | 5 +----
Source/Common/gdcmConfigure.h.in | 8 ++++----
Testing/Source/Data/CMakeLists.txt | 9 ---------
.../gdcmopenjpeg/cmake/OpenJPEGConfig.cmake.in | 6 +++---
6 files changed, 19 insertions(+), 29 deletions(-)
hooks/post-receive
--
Grassroots DICOM
|