mirror of
https://github.com/UltraCoderRU/libwebrtc.git
synced 2026-01-28 03:15:11 +00:00
Look for depot_tools only when DEPOT_TOOLS_PATH is set
This commit is contained in:
parent
470e444791
commit
638022675f
2 changed files with 14 additions and 12 deletions
|
|
@ -9,13 +9,14 @@ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH}
|
||||||
${CMAKE_SOURCE_DIR}/CMakeModules)
|
${CMAKE_SOURCE_DIR}/CMakeModules)
|
||||||
|
|
||||||
find_package(Git REQUIRED)
|
find_package(Git REQUIRED)
|
||||||
find_package(DepotTools REQUIRED)
|
|
||||||
|
|
||||||
if (WIN32)
|
if (DEPOT_TOOLS_PATH)
|
||||||
set(PYTHON_EXECUTABLE ${DEPOTTOOLS_PATH}/python.bat)
|
find_package(DepotTools REQUIRED)
|
||||||
else (WIN32)
|
endif (DEPOT_TOOLS_PATH)
|
||||||
find_package(PythonInterp REQUIRED)
|
|
||||||
endif (WIN32)
|
if (NOT WIN32)
|
||||||
|
find_package(PythonInterp 2.7 REQUIRED)
|
||||||
|
endif (NOT WIN32)
|
||||||
|
|
||||||
include(FindLibraries)
|
include(FindLibraries)
|
||||||
include(Version)
|
include(Version)
|
||||||
|
|
|
||||||
|
|
@ -1,16 +1,17 @@
|
||||||
find_program(GCLIENT_EXECUTABLE
|
find_program(GCLIENT_EXECUTABLE
|
||||||
NAMES gclient gclient.bat
|
NAMES gclient gclient.bat
|
||||||
PATHS ${CMAKE_CURRENT_SOURCE_DIR}/depot_tools)
|
DOC "Path to gclient executable"
|
||||||
|
HINTS ${DEPOT_TOOLS_PATH} ENV DEPOT_TOOLS_PATH)
|
||||||
|
|
||||||
find_path(DEPOTTOOLS_PATH
|
find_path(DEPOT_TOOLS_PATH
|
||||||
NAMES gclient gclient.py gclient.bat
|
NAMES gclient gclient.py gclient.bat
|
||||||
gn gn.py gn.bat
|
|
||||||
ninja ninja.exe ninja-linux32 ninja-linux64 ninja-mac
|
ninja ninja.exe ninja-linux32 ninja-linux64 ninja-mac
|
||||||
download_from_google_storage download_from_google_storage.bat
|
download_from_google_storage download_from_google_storage.bat
|
||||||
download_from_google_storage.py
|
download_from_google_storage.py
|
||||||
HINTS ${CMAKE_CURRENT_SOURCE_DIR}/depot_tools)
|
DOC "Path to depot_tools directory"
|
||||||
|
HINTS ${DEPOT_TOOLS_PATH} ENV DEPOT_TOOLS_PATH)
|
||||||
|
|
||||||
include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
|
include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
|
||||||
find_package_handle_standard_args(DepotTools
|
find_package_handle_standard_args(DepotTools
|
||||||
REQUIRED_VARS GCLIENT_EXECUTABLE
|
REQUIRED_VARS GCLIENT_EXECUTABLE DEPOT_TOOLS_PATH
|
||||||
FAIL_MESSAGE "Could not find the gclient executable.")
|
FAIL_MESSAGE "Could not find depot_tools.")
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue