2 # Find the native GDAL includes and library
4 # GDAL_INCLUDE_DIR, where to find gdal.h, etc.
5 # GDAL_LIBRARIES, the libraries needed to use GDAL.
6 # GDAL_FOUND, If false, do not try to use GDAL.
7 # also defined, but not for general use are
8 # GDAL_LIBRARY, where to find the GDAL library.
10 FIND_PATH(GDAL_INCLUDE_DIR gdal.h)
12 SET(GDAL_NAMES_RELEASE ${GDAL_NAMES_RELEASE} gdal)
13 FIND_LIBRARY(GDAL_LIBRARY_RELEASE NAMES ${GDAL_NAMES_RELEASE} )
15 SET(GDAL_NAMES_DEBUG ${GDAL_NAMES_DEBUG} gdald)
16 FIND_LIBRARY(GDAL_LIBRARY_DEBUG NAMES ${GDAL_NAMES_DEBUG} )
18 IF(GDAL_LIBRARY_DEBUG)
19 SET(GDAL_LIBRARIES_FOUND TRUE)
20 MARK_AS_ADVANCED(GDAL_LIBRARY_DEBUG)
21 ENDIF(GDAL_LIBRARY_DEBUG)
23 IF(GDAL_LIBRARY_RELEASE)
24 SET(GDAL_LIBRARIES_FOUND TRUE)
25 MARK_AS_ADVANCED(GDAL_LIBRARY_RELEASE)
26 ENDIF(GDAL_LIBRARY_RELEASE)
28 # handle the QUIETLY and REQUIRED arguments and set GDAL_FOUND to TRUE if
29 # all listed variables are TRUE
30 INCLUDE(FindPackageHandleStandardArgs)
31 FIND_PACKAGE_HANDLE_STANDARD_ARGS(GDAL DEFAULT_MSG
32 GDAL_LIBRARIES_FOUND GDAL_INCLUDE_DIR)
35 # SET(GDAL_LIBRARIES ${GDAL_LIBRARY})
38 # Deprecated declarations.
39 #SET (NATIVE_GDAL_INCLUDE_PATH ${GDAL_INCLUDE_DIR} )
41 # GET_FILENAME_COMPONENT (NATIVE_GDAL_LIB_PATH ${GDAL_LIBRARY} PATH)
44 MARK_AS_ADVANCED(GDAL_LIBRARIES_FOUND GDAL_INCLUDE_DIR )