mirror of
https://github.com/UltraCoderRU/libwebrtc.git
synced 2026-01-28 03:15:11 +00:00
Passthrough GN_EXTRA_ARGS and NINJA_ARGS.
Fix GEN_ARGS_DEBUG for MSVC.
This commit is contained in:
parent
477b5b2220
commit
2db22c8048
2 changed files with 8 additions and 5 deletions
|
|
@ -4,8 +4,8 @@ set(CMAKE_CONFIGURATION_TYPES Debug Release CACHE STRING INTERNAL FORCE)
|
||||||
|
|
||||||
project(libwebrtc)
|
project(libwebrtc)
|
||||||
|
|
||||||
option(GN_EXTRA_ARGS "Extra 'gn gen' arguments to pass when configuring WebRTC" "")
|
set(GN_EXTRA_ARGS "" CACHE STRING "Extra 'gn gen' arguments to pass when configuring WebRTC")
|
||||||
option(NINJA_ARGS "Ninja arguments to pass when compiling WebRTC" "")
|
set(NINJA_ARGS "" CACHE STRING "Ninja arguments to pass when compiling WebRTC")
|
||||||
option(BUILD_DEB_PACKAGE "Build .deb package" OFF)
|
option(BUILD_DEB_PACKAGE "Build .deb package" OFF)
|
||||||
|
|
||||||
# Allow the use of IN_LIST operand
|
# Allow the use of IN_LIST operand
|
||||||
|
|
|
||||||
|
|
@ -4,12 +4,15 @@ function(add_webrtc_target SOURCE_DIR BUILD_DIR)
|
||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
set(GEN_ARGS_COMMON "${GEN_ARGS_COMMON} is_clang=false use_lld=false")
|
set(GEN_ARGS_COMMON "${GEN_ARGS_COMMON} is_clang=false use_lld=false")
|
||||||
set(GEN_ARGS_DEBUG "${GEN_ARGS_DEBUG} enable_iterator_debugging=true")
|
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
set(GEN_ARGS_DEBUG "${GEN_ARGS_COMMON} is_debug=true")
|
set(GEN_ARGS_DEBUG "${GEN_ARGS_COMMON} is_debug=true")
|
||||||
set(GEN_ARGS_RELEASE "${GEN_ARGS_COMMON} is_debug=false")
|
set(GEN_ARGS_RELEASE "${GEN_ARGS_COMMON} is_debug=false")
|
||||||
|
|
||||||
|
if (MSVC)
|
||||||
|
set(GEN_ARGS_DEBUG "${GEN_ARGS_DEBUG} enable_iterator_debugging=true")
|
||||||
|
endif ()
|
||||||
|
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
set(GN_EXECUTABLE gn.bat)
|
set(GN_EXECUTABLE gn.bat)
|
||||||
else ()
|
else ()
|
||||||
|
|
@ -60,10 +63,10 @@ function(add_webrtc_target SOURCE_DIR BUILD_DIR)
|
||||||
add_custom_target(webrtc-build ALL)
|
add_custom_target(webrtc-build ALL)
|
||||||
add_custom_target(webrtc-clean)
|
add_custom_target(webrtc-clean)
|
||||||
if (CMAKE_GENERATOR MATCHES "Visual Studio")
|
if (CMAKE_GENERATOR MATCHES "Visual Studio")
|
||||||
add_custom_command_with_path(webrtc-build ninja -C "${BUILD_DIR}/$<CONFIG>" :webrtc jsoncpp libyuv)
|
add_custom_command_with_path(webrtc-build ninja -C "${BUILD_DIR}/$<CONFIG>" :webrtc jsoncpp libyuv ${NINJA_ARGS})
|
||||||
add_custom_command_with_path(webrtc-clean ${GN_EXECUTABLE} clean "${BUILD_DIR}/$<CONFIG>")
|
add_custom_command_with_path(webrtc-clean ${GN_EXECUTABLE} clean "${BUILD_DIR}/$<CONFIG>")
|
||||||
else ()
|
else ()
|
||||||
add_custom_command_with_path(webrtc-build ninja -C "${BUILD_DIR}" :webrtc jsoncpp libyuv)
|
add_custom_command_with_path(webrtc-build ninja -C "${BUILD_DIR}" :webrtc jsoncpp libyuv ${NINJA_ARGS})
|
||||||
add_custom_command_with_path(webrtc-clean ${GN_EXECUTABLE} clean "${BUILD_DIR}")
|
add_custom_command_with_path(webrtc-clean ${GN_EXECUTABLE} clean "${BUILD_DIR}")
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue