1 #-----------------------------------------------------------------------------
2 # Rebuild gdcm whenever a file starting with gdcm* is modified
3 INCLUDE_REGULAR_EXPRESSION("^gdcm.*$")
5 SET(GDCM_LIBRARIES gdcm CACHE INTERNAL "libraries for GDCM")
15 # "jpeglib.h" is defined here:
17 ${GDCM_SOURCE_DIR}/src
18 ${GDCM_SOURCE_DIR}/src/gdcmmpeg2/src/mpeg2dec
19 ${GDCM_BINARY_DIR} #for gdcmConfigure.h
20 ${GDCM_BINARY_DIR}/src #for gdcmjpeg 8, 12 and 16
21 ${GDCM_SOURCE_DIR}/src/gdcmopenjpeg/libopenjpeg
27 gdcmCallbackCommand.cxx
29 gdcmCommandManager.cxx
33 gdcmDicomDirElement.cxx
35 gdcmDicomDirPrivate.cxx
37 gdcmDicomDirObject.cxx
38 gdcmDicomDirPatient.cxx
48 gdcmDocEntryArchive.cxx
57 gdcmJPEGFragmentsInfo.cxx
64 gdcmPixelReadConvert.cxx
65 gdcmPixelWriteConvert.cxx
76 ${GDCM_BINARY_DIR}/src/gdcmDefaultDicts.cxx
79 # Since OpenJPEG does not used configured headers we have to
80 # do the -D alternative
81 IF(NOT BUILD_SHARED_LIBS)
82 SET_SOURCE_FILES_PROPERTIES(
83 ${GDCM_SOURCE_DIR}/src/gdcmJpeg2000.cxx
84 COMPILE_FLAGS -DOPJ_STATIC)
85 ENDIF(NOT BUILD_SHARED_LIBS)
87 ADD_LIBRARY(gdcm ${GDCM_SOURCES})
88 TARGET_LINK_LIBRARIES(gdcm
97 TARGET_LINK_LIBRARIES(gdcm wsock32 snmpapi)
101 # Need nsl to resolve gethostbyname on SunOS-5.8
103 IF(CMAKE_SYSTEM MATCHES "SunOS.*")
104 TARGET_LINK_LIBRARIES(gdcm socket nsl)
105 ENDIF(CMAKE_SYSTEM MATCHES "SunOS.*")
107 IF(NOT GDCM_INSTALL_NO_DEVELOPMENT)
108 # Install header file used to construct the lib
110 # ${GDCM_INSTALL_INCLUDE_DIR} .h ${GDCM_SOURCES})
111 INSTALL_FILES(${GDCM_INSTALL_INCLUDE_DIR} "\\.h$")
112 ENDIF(NOT GDCM_INSTALL_NO_DEVELOPMENT)
114 IF(NOT GDCM_INSTALL_NO_LIBRARIES)
115 #Install the target itself
117 ${GDCM_INSTALL_LIB_DIR}
118 RUNTIME_DIRECTORY ${GDCM_INSTALL_BIN_DIR}
120 ENDIF(NOT GDCM_INSTALL_NO_LIBRARIES)