]> Creatis software - gdcm.git/blob - src/CMakeLists.txt
ENH: Remove ref to jasper, add OpenJPEG implementation
[gdcm.git] / src / CMakeLists.txt
1 #-----------------------------------------------------------------------------
2 # Rebuild gdcm whenever a file starting with gdcm* is modified
3 INCLUDE_REGULAR_EXPRESSION("^gdcm.*$")
4
5 SUBDIRS(
6   gdcmjpeg
7   #gdcmmpeg2
8   gdcmjpegls
9   gdcmopenjpeg
10   )
11
12 # "jpeglib.h" is defined here:
13 INCLUDE_DIRECTORIES(
14   ${GDCM_SOURCE_DIR}/src
15   ${GDCM_SOURCE_DIR}/src/gdcmmpeg2/src/mpeg2dec
16   ${GDCM_BINARY_DIR} #for gdcmConfigure.h
17   ${GDCM_BINARY_DIR}/src #for gdcmjpeg 8, 12 and 16 
18   ${GDCM_SOURCE_DIR}/src/gdcmopenjpeg/libopenjpeg
19 )
20
21 SET(libgdcm_la_SOURCES
22    gdcmArgMgr.cxx
23    gdcmBase.cxx
24    gdcmDataEntry.cxx
25    gdcmDebug.cxx
26    gdcmDicomDir.cxx
27    gdcmDicomDirElement.cxx
28    gdcmDicomDirImage.cxx
29    gdcmDicomDirMeta.cxx
30    gdcmDicomDirObject.cxx
31    gdcmDicomDirPatient.cxx
32    gdcmDicomDirVisit.cxx
33    gdcmDicomDirSerie.cxx
34    gdcmDicomDirStudy.cxx
35    gdcmDicomEntry.cxx
36    gdcmDict.cxx
37    gdcmDictEntry.cxx
38    gdcmDictGroupName.cxx
39    gdcmDictSet.cxx
40    gdcmDirList.cxx
41    gdcmDocEntry.cxx
42    gdcmDocEntryArchive.cxx
43    gdcmDocEntrySet.cxx
44    gdcmDocument.cxx
45    gdcmElementSet.cxx
46    gdcmException.cxx
47    gdcmFile.cxx
48    gdcmFileHelper.cxx
49    gdcmGlobal.cxx
50    gdcmJPEGFragment.cxx
51    gdcmJPEGFragmentsInfo.cxx
52    gdcmJpeg8.cxx
53    gdcmJpeg12.cxx
54    gdcmJpeg16.cxx
55    gdcmJpeg2000.cxx
56    #   gdcmMpeg.cxx
57    gdcmOrientation.cxx
58    gdcmPixelReadConvert.cxx
59    gdcmPixelWriteConvert.cxx
60    gdcmRefCounter.cxx
61    gdcmRLEFrame.cxx
62    gdcmRLEFramesInfo.cxx
63    gdcmSeqEntry.cxx
64    gdcmSerieHelper.cxx
65    gdcmSQItem.cxx
66    gdcmTS.cxx
67    gdcmUtil.cxx
68    gdcmValidator.cxx
69    gdcmVR.cxx
70    ${GDCM_BINARY_DIR}/src/gdcmDefaultDicts.cxx
71    )
72
73 ADD_LIBRARY(gdcm ${libgdcm_la_SOURCES})
74 TARGET_LINK_LIBRARIES(gdcm 
75   gdcmjpeg8 
76   gdcmjpeg12
77   gdcmjpeg16
78   #  gdcmmpeg2
79   gdcmopenjpeg
80 )
81 IF(WIN32)
82   IF(NOT BORLAND)
83     TARGET_LINK_LIBRARIES(gdcm wsock32 snmpapi)
84   ENDIF(NOT BORLAND)
85 ENDIF(WIN32)
86
87 # Need nsl to resolve gethostbyname on SunOS-5.8
88 # and socket also
89 IF(CMAKE_SYSTEM MATCHES "SunOS.*")
90   TARGET_LINK_LIBRARIES(gdcm socket nsl)
91 ENDIF(CMAKE_SYSTEM MATCHES "SunOS.*")
92
93 INSTALL_FILES(/include/gdcm "\\.h$")
94 INSTALL_TARGETS(/lib/gdcm/ gdcm)