]> Creatis software - gdcm.git/blob - src/CMakeLists.txt
* Add Command and CommandManager to have possible callback
[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    gdcmCallbackCommand.cxx
25    gdcmCommand.cxx
26    gdcmCommandManager.cxx
27    gdcmDataEntry.cxx
28    gdcmDebug.cxx
29    gdcmDicomDir.cxx
30    gdcmDicomDirElement.cxx
31    gdcmDicomDirImage.cxx
32    gdcmDicomDirMeta.cxx
33    gdcmDicomDirObject.cxx
34    gdcmDicomDirPatient.cxx
35    gdcmDicomDirVisit.cxx
36    gdcmDicomDirSerie.cxx
37    gdcmDicomDirStudy.cxx
38    gdcmDicomEntry.cxx
39    gdcmDict.cxx
40    gdcmDictEntry.cxx
41    gdcmDictGroupName.cxx
42    gdcmDictSet.cxx
43    gdcmDirList.cxx
44    gdcmDocEntry.cxx
45    gdcmDocEntryArchive.cxx
46    gdcmDocEntrySet.cxx
47    gdcmDocument.cxx
48    gdcmElementSet.cxx
49    gdcmException.cxx
50    gdcmFile.cxx
51    gdcmFileHelper.cxx
52    gdcmGlobal.cxx
53    gdcmJPEGFragment.cxx
54    gdcmJPEGFragmentsInfo.cxx
55    gdcmJpeg8.cxx
56    gdcmJpeg12.cxx
57    gdcmJpeg16.cxx
58    gdcmJpeg2000.cxx
59    #gdcmMpeg.cxx
60    gdcmOrientation.cxx
61    gdcmPixelReadConvert.cxx
62    gdcmPixelWriteConvert.cxx
63    gdcmRefCounter.cxx
64    gdcmRLEFrame.cxx
65    gdcmRLEFramesInfo.cxx
66    gdcmSeqEntry.cxx
67    gdcmSerieHelper.cxx
68    gdcmSQItem.cxx
69    gdcmTS.cxx
70    gdcmUtil.cxx
71    gdcmValidator.cxx
72    gdcmVR.cxx
73    ${GDCM_BINARY_DIR}/src/gdcmDefaultDicts.cxx
74    )
75
76 ADD_LIBRARY(gdcm ${libgdcm_la_SOURCES})
77 TARGET_LINK_LIBRARIES(gdcm 
78   gdcmjpeg8 
79   gdcmjpeg12
80   gdcmjpeg16
81   #gdcmmpeg2
82   gdcmopenjpeg
83 )
84 IF(WIN32)
85   IF(NOT BORLAND)
86     TARGET_LINK_LIBRARIES(gdcm wsock32 snmpapi)
87   ENDIF(NOT BORLAND)
88 ENDIF(WIN32)
89
90 # Need nsl to resolve gethostbyname on SunOS-5.8
91 # and socket also
92 IF(CMAKE_SYSTEM MATCHES "SunOS.*")
93   TARGET_LINK_LIBRARIES(gdcm socket nsl)
94 ENDIF(CMAKE_SYSTEM MATCHES "SunOS.*")
95
96 INSTALL_FILES(/include/gdcm "\\.h$")
97 INSTALL_TARGETS(/lib/gdcm/ gdcm)