]> Creatis software - gdcm.git/blob - src/CMakeLists.txt
ENH: Nice trick to set a prefix to the lib
[gdcm.git] / src / CMakeLists.txt
1 #-----------------------------------------------------------------------------
2 # Rebuild gdcm whenever a file starting with gdcm* is modified
3 INCLUDE_REGULAR_EXPRESSION("^gdcm.*$")
4
5 SET(PARENT_PREFIX gdcm)
6 SUBDIRS(
7   gdcmjpeg
8   #gdcmmpeg2
9   #gdcmjpegls
10   gdcmopenjpeg
11   )
12
13 # "jpeglib.h" is defined here:
14 INCLUDE_DIRECTORIES(
15   ${GDCM_SOURCE_DIR}/src
16   ${GDCM_SOURCE_DIR}/src/gdcmmpeg2/src/mpeg2dec
17   ${GDCM_BINARY_DIR} #for gdcmConfigure.h
18   ${GDCM_BINARY_DIR}/src #for gdcmjpeg 8, 12 and 16 
19   ${GDCM_SOURCE_DIR}/src/gdcmopenjpeg/libopenjpeg
20 )
21
22 SET(libgdcm_la_SOURCES
23    gdcmArgMgr.cxx
24    gdcmBase.cxx
25    gdcmCallbackCommand.cxx
26    gdcmCommand.cxx
27    gdcmCommandManager.cxx
28    gdcmDataEntry.cxx
29    gdcmDebug.cxx
30    gdcmDicomDir.cxx
31    gdcmDicomDirElement.cxx
32    gdcmDicomDirImage.cxx
33    gdcmDicomDirMeta.cxx
34    gdcmDicomDirObject.cxx
35    gdcmDicomDirPatient.cxx
36    gdcmDicomDirVisit.cxx
37    gdcmDicomDirSerie.cxx
38    gdcmDicomDirStudy.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)