summaryrefslogtreecommitdiff
path: root/Modules/FindDart.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/FindDart.cmake')
-rw-r--r--Modules/FindDart.cmake26
1 files changed, 15 insertions, 11 deletions
diff --git a/Modules/FindDart.cmake b/Modules/FindDart.cmake
index f7c54df43..a2b2926a7 100644
--- a/Modules/FindDart.cmake
+++ b/Modules/FindDart.cmake
@@ -16,21 +16,25 @@
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
-FIND_PATH(DART_ROOT README.INSTALL
- $ENV{DART_ROOT}
- ${PROJECT_SOURCE_DIR}/Dart
- /usr/share/Dart
- C:/Dart
- "$ENV{ProgramFiles}/Dart"
- "C:/Program Files/Dart"
- ${PROJECT_SOURCE_DIR}/../Dart
- [HKEY_LOCAL_MACHINE\\SOFTWARE\\Dart\\InstallPath]
+find_path(DART_ROOT README.INSTALL
+ HINTS
+ ENV DART_ROOT
+ PATHS
+ ${PROJECT_SOURCE_DIR}
+ /usr/share
+ C:/
+ "C:/Program Files"
+ ${PROJECT_SOURCE_DIR}/..
+ [HKEY_LOCAL_MACHINE\\SOFTWARE\\Dart\\InstallPath]
+ ENV ProgramFiles
+ PATH_SUFFIXES
+ Dart
DOC "If you have Dart installed, where is it located?"
)
# handle the QUIETLY and REQUIRED arguments and set DART_FOUND to TRUE if
# all listed variables are TRUE
-INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
+include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Dart DEFAULT_MSG DART_ROOT)
-MARK_AS_ADVANCED(DART_ROOT)
+mark_as_advanced(DART_ROOT)