mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-06 22:30:07 -05:00
ENH: Cleanup Find* modules with new HINTS feature
- The find_* commands now provide a HINTS option.
- The option specifies paths to be preferred over the system paths.
- Many Find* modules were using two find calls with NO_DEFAULT_PATH
to approximate the behavior, but that blocked users from overriding
things with CMAKE_PREFIX_PATH.
- This commit uses the HINTS feature to get desired behavior in
only one find command call.
This commit is contained in:
+3
-14
@@ -20,14 +20,9 @@
|
||||
# #include "gdal.h"
|
||||
|
||||
FIND_PATH(GDAL_INCLUDE_DIR gdal.h
|
||||
HINTS
|
||||
$ENV{GDAL_DIR}
|
||||
NO_DEFAULT_PATH
|
||||
PATH_SUFFIXES include
|
||||
)
|
||||
|
||||
|
||||
|
||||
FIND_PATH(GDAL_INCLUDE_DIR gdal.h
|
||||
PATH_SUFFIXES include
|
||||
PATHS
|
||||
~/Library/Frameworks/gdal.framework/Headers
|
||||
/Library/Frameworks/gdal.framework/Headers
|
||||
@@ -53,14 +48,9 @@ FIND_PATH(GDAL_INCLUDE_DIR gdal.h
|
||||
|
||||
FIND_LIBRARY(GDAL_LIBRARY
|
||||
NAMES gdal GDAL
|
||||
PATHS
|
||||
HINTS
|
||||
$ENV{GDAL_DIR}
|
||||
NO_DEFAULT_PATH
|
||||
PATH_SUFFIXES lib64 lib
|
||||
)
|
||||
|
||||
FIND_LIBRARY(GDAL_LIBRARY
|
||||
NAMES gdal GDAL
|
||||
PATHS
|
||||
~/Library/Frameworks
|
||||
/Library/Frameworks
|
||||
@@ -72,7 +62,6 @@ FIND_LIBRARY(GDAL_LIBRARY
|
||||
/opt
|
||||
/usr/freeware
|
||||
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Session\ Manager\\Environment;GDAL_ROOT]/lib
|
||||
PATH_SUFFIXES lib64 lib
|
||||
)
|
||||
|
||||
SET(GDAL_FOUND "NO")
|
||||
|
||||
Reference in New Issue
Block a user