# Rebuild gdcm whenever a file starting with gdcm* is modified
INCLUDE_REGULAR_EXPRESSION("^gdcm.*$")
+SET(OPJ_PREFIX gdcm)
SUBDIRS(
gdcmjpeg
#gdcmmpeg2
gdcmDicomDirVisit.cxx
gdcmDicomDirSerie.cxx
gdcmDicomDirStudy.cxx
- gdcmDicomEntry.cxx
gdcmDict.cxx
gdcmDictEntry.cxx
gdcmDictGroupName.cxx
${GDCM_BINARY_DIR}/src/gdcmDefaultDicts.cxx
)
+# Since OpenJPEG does not used configured headers we have to
+# do the -D alternative
+IF(NOT BUILD_SHARED_LIBS)
+ SET_SOURCE_FILES_PROPERTIES(
+ ${GDCM_SOURCE_DIR}/src/gdcmJpeg2000.cxx
+ COMPILE_FLAGS -DOPJ_STATIC)
+ENDIF(NOT BUILD_SHARED_LIBS)
+
ADD_LIBRARY(gdcm ${libgdcm_la_SOURCES})
TARGET_LINK_LIBRARIES(gdcm
gdcmjpeg8