File tree Expand file tree Collapse file tree 2 files changed +16
-4
lines changed
Expand file tree Collapse file tree 2 files changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,7 @@ pybind11_add_module(
7878 $<TARGET_OBJECTS:python_type>)
7979# add _duckdb_dependencies
8080target_link_libraries (_duckdb PRIVATE _duckdb_dependencies)
81+ duckdb_link_extensions(_duckdb)
8182
8283# ────────────────────────────────────────────
8384# Controlling symbol export
Original file line number Diff line number Diff line change @@ -220,10 +220,6 @@ function(_duckdb_print_summary)
220220 message (STATUS " Native Arch: ${NATIVE_ARCH} " )
221221 message (STATUS " Unity Build Disabled: ${DISABLE_UNITY} " )
222222
223- if (BUILD_EXTENSIONS)
224- message (STATUS " Extensions: ${BUILD_EXTENSIONS} " )
225- endif ()
226-
227223 set (debug_opts)
228224 if (FORCE_ASSERT)
229225 list (APPEND debug_opts "FORCE_ASSERT" )
@@ -253,6 +249,21 @@ function(duckdb_add_library target_name)
253249 _duckdb_create_interface_target(${target_name} )
254250endfunction ()
255251
252+ function (duckdb_link_extensions target_name)
253+ # Link to the DuckDB static library and extensions
254+ target_link_libraries (${target_name}
255+ PRIVATE duckdb_generated_extension_loader)
256+ if (BUILD_EXTENSIONS)
257+ message (STATUS "Linking DuckDB extensions:" )
258+ foreach (ext IN LISTS BUILD_EXTENSIONS)
259+ message (STATUS "- ${ext} " )
260+ target_link_libraries (${target_name} PRIVATE ${ext} _extension)
261+ endforeach ()
262+ else ()
263+ message (STATUS "No DuckDB extensions linked in" )
264+ endif ()
265+ endfunction ()
266+
256267# ════════════════════════════════════════════════════════════════════════════════
257268# Convenience Functions
258269# ════════════════════════════════════════════════════════════════════════════════
You can’t perform that action at this time.
0 commit comments