From 869e1240eacda4556343a3904bf73ed274836377 Mon Sep 17 00:00:00 2001 From: Konstantin Pavlov Date: Tue, 19 Dec 2023 16:37:53 -0800 Subject: [PATCH] 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. --- config | 1 + 1 file changed, 1 insertion(+) diff --git a/config b/config index 11d3317..3bffddc 100644 --- a/config +++ b/config @@ -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