X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;ds=sidebyside;f=src%2FCMakeLists.txt;h=b00eb68a9691f85ee2ce04b1a32ccd14dab82bda;hb=c96275c8881429e3d6448fc7c16a2c324ffc4883;hp=c7101a675db489ec67332c888d5ccea545e07abf;hpb=46afb30d2d016a9b1581c7ee4ca96d614a35203c;p=gdcm.git diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c7101a67..b00eb68a 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -2,6 +2,7 @@ # Rebuild gdcm whenever a file starting with gdcm* is modified INCLUDE_REGULAR_EXPRESSION("^gdcm.*$") +SET(OPJ_PREFIX gdcm) SUBDIRS( gdcmjpeg #gdcmmpeg2 @@ -35,7 +36,6 @@ SET(libgdcm_la_SOURCES gdcmDicomDirVisit.cxx gdcmDicomDirSerie.cxx gdcmDicomDirStudy.cxx - gdcmDicomEntry.cxx gdcmDict.cxx gdcmDictEntry.cxx gdcmDictGroupName.cxx @@ -73,6 +73,14 @@ SET(libgdcm_la_SOURCES ${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