Unverified 提交 ac3492ce authored 作者: Nazar Mokrynskyi's avatar Nazar Mokrynskyi 提交者: GitHub

Merge pull request #843 from nazar-pc/fix-meson-args

Fix `MESON_ARGS` example and add corresponding options
...@@ -21,7 +21,7 @@ INSTALL_DIR ?= $(MEDIASOUP_OUT_DIR)/$(MEDIASOUP_BUILDTYPE) ...@@ -21,7 +21,7 @@ INSTALL_DIR ?= $(MEDIASOUP_OUT_DIR)/$(MEDIASOUP_BUILDTYPE)
BUILD_DIR ?= $(MEDIASOUP_OUT_DIR)/$(MEDIASOUP_BUILDTYPE)/build BUILD_DIR ?= $(MEDIASOUP_OUT_DIR)/$(MEDIASOUP_BUILDTYPE)/build
MESON ?= $(PIP_DIR)/bin/meson MESON ?= $(PIP_DIR)/bin/meson
# `MESON_ARGS` can be used to provide extra configuration parameters to Meson, such as adding defines or changing # `MESON_ARGS` can be used to provide extra configuration parameters to Meson, such as adding defines or changing
# optimization options. For instance, use `MESON_ARGS="-DMS_LOG_TRACE -DMS_LOG_FILE_LINE" npm i` to compile worker with # optimization options. For instance, use `MESON_ARGS="-Dms_log_trace=true -Dms_log_file_line=true" npm i` to compile worker with
# tracing and enabled. # tracing and enabled.
# #
# NOTE: On Windows make sure to add `--vsenv` or have MSVS environment already active if you override this parameter. # NOTE: On Windows make sure to add `--vsenv` or have MSVS environment already active if you override this parameter.
......
...@@ -26,6 +26,18 @@ if host_machine.system() == 'windows' ...@@ -26,6 +26,18 @@ if host_machine.system() == 'windows'
] ]
endif endif
if get_option('ms_log_trace')
cpp_args += [
'-DMS_LOG_TRACE',
]
endif
if get_option('ms_log_file_line')
cpp_args += [
'-DMS_LOG_FILE_LINE',
]
endif
common_sources = [ common_sources = [
'src/lib.cpp', 'src/lib.cpp',
'src/DepLibSRTP.cpp', 'src/DepLibSRTP.cpp',
......
option('ms_log_trace', type : 'boolean', value : false, description : 'When enabled, logs the current method/function if current log level is "debug"')
option('ms_log_file_line', type : 'boolean', value : false, description : 'When enabled, all the logging macros print more verbose information, including current file and line')
Markdown 格式
0% 或
您添加了 0 人 到此讨论。请谨慎行事。
请先完成此评论的编辑!
请 注册 或者 后发表评论