From 7255712389b403a89c9ce411c191fd543c36fae1 Mon Sep 17 00:00:00 2001 From: Dmitry Plotnikov Date: Tue, 12 Mar 2024 12:04:45 -0700 Subject: [PATCH] Fix undefined symbols error on Mac (fix #38). --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 50c0c55..9b43f16 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -116,6 +116,10 @@ set_target_properties(ngx_otel_module PROPERTIES PREFIX "") # can't use OTel's WITH_ABSEIL until cmake 3.24, as it triggers find_package() target_compile_definitions(ngx_otel_module PRIVATE HAVE_ABSEIL) +if (APPLE) + target_link_options(ngx_otel_module PRIVATE -undefined dynamic_lookup) +endif() + target_include_directories(ngx_otel_module PRIVATE ${NGX_OTEL_NGINX_BUILD_DIR} ${NGX_OTEL_NGINX_DIR}/src/core