STYLE: Nightly Version update
[cmake.git] / Modules / FindDCMTK.cmake
blob3b0ec59da2c6af8b40cbd71e2bdbf76fb7904d52
2 # try to find DCMTK libraries
5 # DCMTK_INCLUDE_DIR   - Directories to include to use DCMTK
6 # DCMTK_LIBRARIES     - Files to link against to use DCMTK
7 # DCMTK_FOUND         - If false, don't try to use DCMTK
8 # DCMTK_DIR           - (optional) Source directory for DCMTK
10 # DCMTK_DIR can be used to make it simpler to find the various include
11 # directories and compiled libraries if you've just compiled it in the
12 # source tree. Just set it to the root of the tree where you extracted
13 # the source.
15 # Written for VXL by Amitha Perera.
16
18 FIND_PATH( DCMTK_config_INCLUDE_DIR osconfig.h
19   ${DCMTK_DIR}/config/include
22 FIND_PATH( DCMTK_ofstd_INCLUDE_DIR ofstdinc.h
23   ${DCMTK_DIR}/ofstd/include
26 FIND_LIBRARY( DCMTK_ofstd_LIBRARY ofstd
27   ${DCMTK_DIR}/ofstd/libsrc
28   ${DCMTK_DIR}/ofstd/Release
29   ${DCMTK_DIR}/ofstd/Debug
33 FIND_PATH( DCMTK_dcmdata_INCLUDE_DIR dctypes.h
34   ${DCMTK_DIR}/dcmdata/include
37 FIND_LIBRARY( DCMTK_dcmdata_LIBRARY dcmdata
38   ${DCMTK_DIR}/dcmdata/libsrc
39   ${DCMTK_DIR}/dcmdata/Release
40   ${DCMTK_DIR}/dcmdata/Debug
44 FIND_PATH( DCMTK_dcmimgle_INCLUDE_DIR dcmimage.h
45   ${DCMTK_DIR}/dcmimgle/include
48 FIND_LIBRARY( DCMTK_dcmimgle_LIBRARY dcmimgle
49   ${DCMTK_DIR}/dcmimgle/libsrc
50   ${DCMTK_DIR}/dcmimgle/Release
51   ${DCMTK_DIR}/dcmimgle/Debug
55 IF( DCMTK_config_INCLUDE_DIR )
56 IF( DCMTK_ofstd_INCLUDE_DIR )
57 IF( DCMTK_ofstd_LIBRARY )
58 IF( DCMTK_dcmdata_INCLUDE_DIR )
59 IF( DCMTK_dcmdata_LIBRARY )
60 IF( DCMTK_dcmimgle_INCLUDE_DIR )
61 IF( DCMTK_dcmimgle_LIBRARY )
63   SET( DCMTK_FOUND "YES" )
64   SET( DCMTK_INCLUDE_DIR
65     ${DCMTK_config_INCLUDE_DIR}
66     ${DCMTK_ofstd_INCLUDE_DIR}
67     ${DCMTK_dcmdata_INCLUDE_DIR}
68     ${DCMTK_dcmimgle_INCLUDE_DIR}
69   )
71   SET( DCMTK_LIBRARIES
72     ${DCMTK_dcmimgle_LIBRARY}
73     ${DCMTK_dcmdata_LIBRARY}
74     ${DCMTK_ofstd_LIBRARY}
75     ${DCMTK_config_LIBRARY}
76   )
78   IF( WIN32 )
79     SET( DCMTK_LIBRARIES ${DCMTK_LIBRARIES} netapi32 )
80   ENDIF( WIN32 )
82 ENDIF( DCMTK_dcmimgle_LIBRARY )
83 ENDIF( DCMTK_dcmimgle_INCLUDE_DIR )
84 ENDIF( DCMTK_dcmdata_LIBRARY )
85 ENDIF( DCMTK_dcmdata_INCLUDE_DIR )
86 ENDIF( DCMTK_ofstd_LIBRARY )
87 ENDIF( DCMTK_ofstd_INCLUDE_DIR )
88 ENDIF( DCMTK_config_INCLUDE_DIR )
90 IF( NOT DCMTK_FOUND )
91   SET( DCMTK_DIR "" CACHE PATH "Root of DCMTK source tree (optional)." )
92   MARK_AS_ADVANCED( DCMTK_DIR )
93 ENDIF( NOT DCMTK_FOUND )