summaryrefslogtreecommitdiffstats
path: root/Modules/FindDCMTK.cmake
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2004-04-22 20:16:15 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2004-04-22 20:16:15 (GMT)
commit8ba5612136d6d37db1abec8041be9dad2b834949 (patch)
tree54e9b922c6b268d2a703acbfdc9203e7c8a6c838 /Modules/FindDCMTK.cmake
parent45878db5080c6972d08acd4efed4008f30b14d31 (diff)
downloadCMake-8ba5612136d6d37db1abec8041be9dad2b834949.zip
CMake-8ba5612136d6d37db1abec8041be9dad2b834949.tar.gz
CMake-8ba5612136d6d37db1abec8041be9dad2b834949.tar.bz2
ENH: contribution from Ian Scott, thanks.
Diffstat (limited to 'Modules/FindDCMTK.cmake')
-rw-r--r--Modules/FindDCMTK.cmake93
1 files changed, 93 insertions, 0 deletions
diff --git a/Modules/FindDCMTK.cmake b/Modules/FindDCMTK.cmake
new file mode 100644
index 0000000..3b0ec59
--- /dev/null
+++ b/Modules/FindDCMTK.cmake
@@ -0,0 +1,93 @@
+#
+# try to find DCMTK libraries
+#
+
+# DCMTK_INCLUDE_DIR - Directories to include to use DCMTK
+# DCMTK_LIBRARIES - Files to link against to use DCMTK
+# DCMTK_FOUND - If false, don't try to use DCMTK
+# DCMTK_DIR - (optional) Source directory for DCMTK
+#
+# DCMTK_DIR can be used to make it simpler to find the various include
+# directories and compiled libraries if you've just compiled it in the
+# source tree. Just set it to the root of the tree where you extracted
+# the source.
+#
+# Written for VXL by Amitha Perera.
+#
+
+FIND_PATH( DCMTK_config_INCLUDE_DIR osconfig.h
+ ${DCMTK_DIR}/config/include
+)
+
+FIND_PATH( DCMTK_ofstd_INCLUDE_DIR ofstdinc.h
+ ${DCMTK_DIR}/ofstd/include
+)
+
+FIND_LIBRARY( DCMTK_ofstd_LIBRARY ofstd
+ ${DCMTK_DIR}/ofstd/libsrc
+ ${DCMTK_DIR}/ofstd/Release
+ ${DCMTK_DIR}/ofstd/Debug
+)
+
+
+FIND_PATH( DCMTK_dcmdata_INCLUDE_DIR dctypes.h
+ ${DCMTK_DIR}/dcmdata/include
+)
+
+FIND_LIBRARY( DCMTK_dcmdata_LIBRARY dcmdata
+ ${DCMTK_DIR}/dcmdata/libsrc
+ ${DCMTK_DIR}/dcmdata/Release
+ ${DCMTK_DIR}/dcmdata/Debug
+)
+
+
+FIND_PATH( DCMTK_dcmimgle_INCLUDE_DIR dcmimage.h
+ ${DCMTK_DIR}/dcmimgle/include
+)
+
+FIND_LIBRARY( DCMTK_dcmimgle_LIBRARY dcmimgle
+ ${DCMTK_DIR}/dcmimgle/libsrc
+ ${DCMTK_DIR}/dcmimgle/Release
+ ${DCMTK_DIR}/dcmimgle/Debug
+)
+
+
+IF( DCMTK_config_INCLUDE_DIR )
+IF( DCMTK_ofstd_INCLUDE_DIR )
+IF( DCMTK_ofstd_LIBRARY )
+IF( DCMTK_dcmdata_INCLUDE_DIR )
+IF( DCMTK_dcmdata_LIBRARY )
+IF( DCMTK_dcmimgle_INCLUDE_DIR )
+IF( DCMTK_dcmimgle_LIBRARY )
+
+ SET( DCMTK_FOUND "YES" )
+ SET( DCMTK_INCLUDE_DIR
+ ${DCMTK_config_INCLUDE_DIR}
+ ${DCMTK_ofstd_INCLUDE_DIR}
+ ${DCMTK_dcmdata_INCLUDE_DIR}
+ ${DCMTK_dcmimgle_INCLUDE_DIR}
+ )
+
+ SET( DCMTK_LIBRARIES
+ ${DCMTK_dcmimgle_LIBRARY}
+ ${DCMTK_dcmdata_LIBRARY}
+ ${DCMTK_ofstd_LIBRARY}
+ ${DCMTK_config_LIBRARY}
+ )
+
+ IF( WIN32 )
+ SET( DCMTK_LIBRARIES ${DCMTK_LIBRARIES} netapi32 )
+ ENDIF( WIN32 )
+
+ENDIF( DCMTK_dcmimgle_LIBRARY )
+ENDIF( DCMTK_dcmimgle_INCLUDE_DIR )
+ENDIF( DCMTK_dcmdata_LIBRARY )
+ENDIF( DCMTK_dcmdata_INCLUDE_DIR )
+ENDIF( DCMTK_ofstd_LIBRARY )
+ENDIF( DCMTK_ofstd_INCLUDE_DIR )
+ENDIF( DCMTK_config_INCLUDE_DIR )
+
+IF( NOT DCMTK_FOUND )
+ SET( DCMTK_DIR "" CACHE PATH "Root of DCMTK source tree (optional)." )
+ MARK_AS_ADVANCED( DCMTK_DIR )
+ENDIF( NOT DCMTK_FOUND )