2009-10-30 18:48:44 +03:00
|
|
|
# - find DCMTK libraries and applications
|
2004-04-23 00:16:15 +04:00
|
|
|
#
|
|
|
|
|
2005-12-14 21:51:08 +03:00
|
|
|
# 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
|
2004-04-23 00:16:15 +04:00
|
|
|
#
|
|
|
|
# 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
|
2009-10-30 18:48:44 +03:00
|
|
|
# the source (default to /usr/include/dcmtk/)
|
2009-09-28 19:45:50 +04:00
|
|
|
|
|
|
|
#=============================================================================
|
|
|
|
# Copyright 2004-2009 Kitware, Inc.
|
2009-10-30 18:48:44 +03:00
|
|
|
# Copyright 2009 Mathieu Malaterre <mathieu.malaterre@gmail.com>
|
2009-09-28 19:45:50 +04:00
|
|
|
#
|
|
|
|
# Distributed under the OSI-approved BSD License (the "License");
|
|
|
|
# see accompanying file Copyright.txt for details.
|
|
|
|
#
|
|
|
|
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
|
|
|
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
# See the License for more information.
|
|
|
|
#=============================================================================
|
|
|
|
# (To distributed this file outside of CMake, substitute the full
|
|
|
|
# License text for the above reference.)
|
|
|
|
|
2004-04-23 00:16:15 +04:00
|
|
|
#
|
|
|
|
# Written for VXL by Amitha Perera.
|
2009-10-30 18:48:44 +03:00
|
|
|
# Upgraded for GDCM by Mathieu Malaterre.
|
2004-04-23 00:16:15 +04:00
|
|
|
#
|
|
|
|
|
2009-10-30 18:48:44 +03:00
|
|
|
IF( NOT DCMTK_FOUND )
|
|
|
|
SET( DCMTK_DIR "/usr/include/dcmtk/"
|
|
|
|
CACHE PATH "Root of DCMTK source tree (optional)." )
|
|
|
|
MARK_AS_ADVANCED( DCMTK_DIR )
|
|
|
|
ENDIF( NOT DCMTK_FOUND )
|
|
|
|
|
|
|
|
|
2004-04-23 00:16:15 +04:00
|
|
|
FIND_PATH( DCMTK_config_INCLUDE_DIR osconfig.h
|
2009-10-30 18:48:44 +03:00
|
|
|
${DCMTK_DIR}/config/include
|
|
|
|
${DCMTK_DIR}/config
|
|
|
|
${DCMTK_DIR}/include
|
2004-04-23 00:16:15 +04:00
|
|
|
)
|
|
|
|
|
|
|
|
FIND_PATH( DCMTK_ofstd_INCLUDE_DIR ofstdinc.h
|
2009-10-30 18:48:44 +03:00
|
|
|
${DCMTK_DIR}/ofstd/include
|
|
|
|
${DCMTK_DIR}/ofstd
|
|
|
|
${DCMTK_DIR}/include/ofstd
|
2004-04-23 00:16:15 +04:00
|
|
|
)
|
|
|
|
|
|
|
|
FIND_LIBRARY( DCMTK_ofstd_LIBRARY ofstd
|
|
|
|
${DCMTK_DIR}/ofstd/libsrc
|
2005-07-05 19:17:58 +04:00
|
|
|
${DCMTK_DIR}/ofstd/libsrc/Release
|
|
|
|
${DCMTK_DIR}/ofstd/libsrc/Debug
|
2004-04-23 00:16:15 +04:00
|
|
|
${DCMTK_DIR}/ofstd/Release
|
|
|
|
${DCMTK_DIR}/ofstd/Debug
|
2005-04-05 21:37:30 +04:00
|
|
|
${DCMTK_DIR}/lib
|
2004-04-23 00:16:15 +04:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
FIND_PATH( DCMTK_dcmdata_INCLUDE_DIR dctypes.h
|
2005-04-05 21:37:30 +04:00
|
|
|
${DCMTK_DIR}/include/dcmdata
|
2009-10-30 18:48:44 +03:00
|
|
|
${DCMTK_DIR}/dcmdata
|
|
|
|
${DCMTK_DIR}/dcmdata/include
|
2004-04-23 00:16:15 +04:00
|
|
|
)
|
|
|
|
|
|
|
|
FIND_LIBRARY( DCMTK_dcmdata_LIBRARY dcmdata
|
|
|
|
${DCMTK_DIR}/dcmdata/libsrc
|
2005-07-05 19:17:58 +04:00
|
|
|
${DCMTK_DIR}/dcmdata/libsrc/Release
|
|
|
|
${DCMTK_DIR}/dcmdata/libsrc/Debug
|
2004-04-23 00:16:15 +04:00
|
|
|
${DCMTK_DIR}/dcmdata/Release
|
|
|
|
${DCMTK_DIR}/dcmdata/Debug
|
2005-04-05 21:37:30 +04:00
|
|
|
${DCMTK_DIR}/lib
|
2004-04-23 00:16:15 +04:00
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
FIND_PATH( DCMTK_dcmimgle_INCLUDE_DIR dcmimage.h
|
|
|
|
${DCMTK_DIR}/dcmimgle/include
|
2009-10-30 18:48:44 +03:00
|
|
|
${DCMTK_DIR}/dcmimgle
|
2005-04-05 21:37:30 +04:00
|
|
|
${DCMTK_DIR}/include/dcmimgle
|
2004-04-23 00:16:15 +04:00
|
|
|
)
|
|
|
|
|
|
|
|
FIND_LIBRARY( DCMTK_dcmimgle_LIBRARY dcmimgle
|
|
|
|
${DCMTK_DIR}/dcmimgle/libsrc
|
2005-07-05 19:17:58 +04:00
|
|
|
${DCMTK_DIR}/dcmimgle/libsrc/Release
|
|
|
|
${DCMTK_DIR}/dcmimgle/libsrc/Debug
|
2004-04-23 00:16:15 +04:00
|
|
|
${DCMTK_DIR}/dcmimgle/Release
|
|
|
|
${DCMTK_DIR}/dcmimgle/Debug
|
2005-04-05 21:37:30 +04:00
|
|
|
${DCMTK_DIR}/lib
|
2004-04-23 00:16:15 +04:00
|
|
|
)
|
|
|
|
|
2009-10-30 18:48:44 +03:00
|
|
|
# MM: I could not find this library on debian system / dcmtk 3.5.4
|
2005-07-05 19:17:58 +04:00
|
|
|
FIND_LIBRARY(DCMTK_imagedb_LIBRARY imagedb
|
2009-10-30 18:48:44 +03:00
|
|
|
${DCMTK_DIR}/imagectn/libsrc/Release
|
|
|
|
${DCMTK_DIR}/imagectn/libsrc/
|
|
|
|
${DCMTK_DIR}/imagectn/libsrc/Debug
|
|
|
|
)
|
2005-07-05 19:17:58 +04:00
|
|
|
|
|
|
|
FIND_LIBRARY(DCMTK_dcmnet_LIBRARY dcmnet
|
2009-10-30 18:48:44 +03:00
|
|
|
${DCMTK_DIR}/dcmnet/libsrc/Release
|
|
|
|
${DCMTK_DIR}/dcmnet/libsrc/Debug
|
|
|
|
${DCMTK_DIR}/dcmnet/libsrc/
|
|
|
|
)
|
2005-07-05 19:17:58 +04:00
|
|
|
|
2004-04-23 00:16:15 +04:00
|
|
|
|
2007-07-19 17:00:51 +04:00
|
|
|
IF( DCMTK_config_INCLUDE_DIR
|
|
|
|
AND DCMTK_ofstd_INCLUDE_DIR
|
|
|
|
AND DCMTK_ofstd_LIBRARY
|
|
|
|
AND DCMTK_dcmdata_INCLUDE_DIR
|
|
|
|
AND DCMTK_dcmdata_LIBRARY
|
|
|
|
AND DCMTK_dcmimgle_INCLUDE_DIR
|
|
|
|
AND DCMTK_dcmimgle_LIBRARY )
|
2004-04-23 00:16:15 +04:00
|
|
|
|
|
|
|
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}
|
|
|
|
)
|
|
|
|
|
2005-07-05 19:17:58 +04:00
|
|
|
IF(DCMTK_imagedb_LIBRARY)
|
|
|
|
SET( DCMTK_LIBRARIES
|
|
|
|
${DCMTK_LIBRARIES}
|
|
|
|
${DCMTK_imagedb_LIBRARY}
|
|
|
|
)
|
|
|
|
ENDIF(DCMTK_imagedb_LIBRARY)
|
|
|
|
|
|
|
|
IF(DCMTK_dcmnet_LIBRARY)
|
|
|
|
SET( DCMTK_LIBRARIES
|
|
|
|
${DCMTK_LIBRARIES}
|
|
|
|
${DCMTK_dcmnet_LIBRARY}
|
|
|
|
)
|
|
|
|
ENDIF(DCMTK_dcmnet_LIBRARY)
|
|
|
|
|
2004-04-23 00:16:15 +04:00
|
|
|
IF( WIN32 )
|
|
|
|
SET( DCMTK_LIBRARIES ${DCMTK_LIBRARIES} netapi32 )
|
|
|
|
ENDIF( WIN32 )
|
|
|
|
|
2007-07-19 17:00:51 +04:00
|
|
|
ENDIF( DCMTK_config_INCLUDE_DIR
|
|
|
|
AND DCMTK_ofstd_INCLUDE_DIR
|
|
|
|
AND DCMTK_ofstd_LIBRARY
|
|
|
|
AND DCMTK_dcmdata_INCLUDE_DIR
|
|
|
|
AND DCMTK_dcmdata_LIBRARY
|
|
|
|
AND DCMTK_dcmimgle_INCLUDE_DIR
|
|
|
|
AND DCMTK_dcmimgle_LIBRARY )
|
2004-04-23 00:16:15 +04:00
|
|
|
|
2009-10-30 18:48:44 +03:00
|
|
|
FIND_PROGRAM(DCMTK_DCMDUMP_EXECUTABLE dcmdump
|
|
|
|
${DCMTK_DIR}/bin
|
|
|
|
)
|
|
|
|
|
|
|
|
FIND_PROGRAM(DCMTK_DCMDJPEG_EXECUTABLE dcmdjpeg
|
|
|
|
${DCMTK_DIR}/bin
|
|
|
|
)
|
|
|
|
|
|
|
|
FIND_PROGRAM(DCMTK_DCMDRLE_EXECUTABLE dcmdrle
|
|
|
|
${DCMTK_DIR}/bin
|
|
|
|
)
|
|
|
|
|
|
|
|
MARK_AS_ADVANCED(
|
|
|
|
DCMTK_DCMDUMP_EXECUTABLE
|
|
|
|
DCMTK_DCMDJPEG_EXECUTABLE
|
|
|
|
DCMTK_DCMDRLE_EXECUTABLE
|
|
|
|
DCMTK_config_INCLUDE_DIR
|
|
|
|
DCMTK_dcmdata_INCLUDE_DIR
|
|
|
|
DCMTK_dcmdata_LIBRARY
|
|
|
|
DCMTK_dcmimgle_INCLUDE_DIR
|
|
|
|
DCMTK_dcmimgle_LIBRARY
|
|
|
|
DCMTK_dcmnet_LIBRARY
|
|
|
|
DCMTK_ofstd_INCLUDE_DIR
|
|
|
|
DCMTK_ofstd_LIBRARY
|
|
|
|
)
|
|
|
|
|