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