diff --git a/CMakeModules/Options.cmake b/CMakeModules/Options.cmake index bfe5d15..65c3e7d 100644 --- a/CMakeModules/Options.cmake +++ b/CMakeModules/Options.cmake @@ -1,6 +1,7 @@ # # Options, flags option(BUILD_TESTS "Build test binaries" OFF) +set(DEPOT_TOOLS_PATH "" CACHE STRING "Path to your own depot_tools directory") set(NINJA_ARGS "" CACHE STRING "Ninja arguments to pass before compiling WebRTC") set(GN_EXTRA_ARGS "" CACHE STRING "Extra gn gen arguments to pass before generating build files") option(BUILD_SHARED_LIB "Build WebRTC as a shared library" OFF) diff --git a/CMakeModules/Prefix.cmake b/CMakeModules/Prefix.cmake index d721c70..3d3dcd8 100644 --- a/CMakeModules/Prefix.cmake +++ b/CMakeModules/Prefix.cmake @@ -1,7 +1,11 @@ # # Generate environment variables # -set(WEBRTC_PATH ${CMAKE_SOURCE_DIR}/depot_tools) +if (DEPOT_TOOLS_PATH) + set(WEBRTC_PATH ${DEPOT_TOOLS_PATH}) +else (DEPOT_TOOLS_PATH) + set(WEBRTC_PATH ${CMAKE_BINARY_DIR}/depot_tools) +endif (DEPOT_TOOLS_PATH) if (WIN32) get_filename_component(DEPOT_TOOLS_PYTHON_PATH