]> Creatis software - gdcm.git/blob - src/CMakeLists.txt
8a44a443cd3e532781773c4eda836a4c1d6689aa
[gdcm.git] / src / CMakeLists.txt
1 #-----------------------------------------------------------------------------
2 # Build jpeg lib first:
3 SUBDIRS(jpeg)
4
5 # "jpeglib.h" is defined here:
6 INCLUDE_DIRECTORIES(
7   ${GDCM_SOURCE_DIR}/
8   ${GDCM_BINARY_DIR}/ #for gdcmConfigure.h
9 #  ${GDCM_BINARY_DIR}/src/jpeg/libijg8  #created a build time
10 #  ${GDCM_BINARY_DIR}/src/jpeg/libijg12 #created a build time
11 )
12
13 SET(libgdcm_la_SOURCES
14    gdcmBinEntry.cxx
15    gdcmDebug.cxx
16    gdcmDicomDir.cxx
17    gdcmDicomDirElement.cxx
18    gdcmDicomDirImage.cxx
19    gdcmDicomDirMeta.cxx
20    gdcmDicomDirObject.cxx
21    gdcmDicomDirPatient.cxx
22    gdcmDicomDirSerie.cxx
23    gdcmDicomDirStudy.cxx
24    gdcmDict.cxx
25    gdcmDictEntry.cxx
26    gdcmDictSet.cxx
27    gdcmDirList.cxx
28    gdcmDocEntry.cxx
29    gdcmDocEntrySet.cxx
30    gdcmDocument.cxx
31    gdcmElementSet.cxx
32    gdcmException.cxx
33    gdcmFile.cxx
34    gdcmGlobal.cxx
35    gdcmHeader.cxx
36    gdcmHeaderHelper.cxx
37    gdcmJPEGFragmentsInfo.cxx
38    gdcmJpeg8.cxx
39    gdcmJpeg12.cxx
40    gdcmJpeg2000.cxx
41    gdcmParsePixels.cxx
42    gdcmPixelConvert.cxx
43    gdcmRLEFramesInfo.cxx
44    gdcmSeqEntry.cxx
45    gdcmSQItem.cxx
46    gdcmTS.cxx
47    gdcmUtil.cxx
48    gdcmValEntry.cxx   
49    gdcmVR.cxx
50    )
51
52 ADD_LIBRARY(gdcm ${libgdcm_la_SOURCES} )
53 IF(UNIX)
54   TARGET_LINK_LIBRARIES(gdcm 
55     gdcmijpeg8 
56     gdcmijpeg12
57     gdcmljpeg     # JPEG lib from xmedcom 
58   )
59 ELSE(UNIX)
60   TARGET_LINK_LIBRARIES(gdcm 
61     gdcmijpeg8 
62     gdcmijpeg12
63     gdcmljpeg
64     Wsock32.lib   #doesn't exist on cygwin
65   )
66 ENDIF(UNIX)
67
68 #The following is not working because when a header file is not found it tries 
69 #to find one in the binary dir
70 #INSTALL_FILES(/include .h ${libgdcm_la_SOURCES})
71 #INSTALL_FILES(/include FILES gdcmIdo.h iddcmjpeg.h)
72 INSTALL_FILES(/include "\\.h$")
73
74 INSTALL_TARGETS(/lib/ gdcm)