Build system: provide a way to pass additional options to cmake invocation.

When building otel module as a part of nginx build system process (via
./configure --add-dynamic-module=nginx-otel/), there is no way to pass
additional options to the cmake invocation, making it impossible link
the module with desired ssl library variant.

With the patch, it's not possible to pass the additional options, e.g.
NGINX_OTEL_ADDITIONAL_OPTS="-DOPENSSL_ROOT_DIR=/usr/lib64/openssl11;/usr/include/openssl11"
./configure --add-dynamic-module=nginx-otel/, and cmake will pick up the
correct ssl variant to link the module with.
This commit is contained in:
Konstantin Pavlov 2023-12-19 16:37:53 -08:00
parent 1a43ddc6f1
commit 869e1240ea

1
config
View file

@ -7,4 +7,5 @@ cmake -D NGX_OTEL_NGINX_BUILD_DIR=$NGX_OBJS \
-D "CMAKE_C_FLAGS=$NGX_CC_OPT" \
-D "CMAKE_CXX_FLAGS=$NGX_CC_OPT" \
-D "CMAKE_MODULE_LINKER_FLAGS=$NGX_LD_OPT" \
$NGINX_OTEL_CMAKE_ADDITIONAL_OPTS \
-S $ngx_addon_dir -B $NGX_OBJS/otel || exit 1