fixed: define build_type before package configure, disable cuda by default
[opensg.git] / CMake / FindGDAL_OpenSG.cmake
blob121fc044bae22faceb64d9e12a200fdb7202d36c
1 # - Find GDAL
2 # Find the native GDAL includes and library
3 # This module defines
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)
34 #IF(GDAL_FOUND)
35 #  SET(GDAL_LIBRARIES ${GDAL_LIBRARY})
36 #ENDIF(GDAL_FOUND)
38 # Deprecated declarations.
39 #SET (NATIVE_GDAL_INCLUDE_PATH ${GDAL_INCLUDE_DIR} )
40 #IF(GDAL_LIBRARY)
41 #  GET_FILENAME_COMPONENT (NATIVE_GDAL_LIB_PATH ${GDAL_LIBRARY} PATH)
42 #ENDIF(GDAL_LIBRARY)
44 MARK_AS_ADVANCED(GDAL_LIBRARIES_FOUND GDAL_INCLUDE_DIR )