Skip to content

Commit bef22c4

Browse files
authored
Merge pull request #634 from carlopi/fixup_linking_proj_in_wasm
Fixup linking of libraries for Wasm
2 parents d1ffa8c + 2eafea4 commit bef22c4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,13 @@ set(TARGET_NAME spatial)
66
set(EXTENSION_NAME ${TARGET_NAME}_extension)
77
set(CMAKE_CXX_STANDARD 11)
88

9+
if (EMSCRIPTEN)
10+
# _LINKED_LIBS influences only Wasm compilation
11+
# it's unclear why this is needed, but somehow the global symbol pj_release from PROJ is not properly exported otherwise
12+
# this solves by basically re-linking (at the moment the Wasm binary is actually produced)
13+
set (DUCKDB_EXTENSION_SPATIAL_LINKED_LIBS "../../vcpkg_installed/wasm32-emscripten/lib/lib*.a")
14+
endif()
15+
916
project(${TARGET_NAME})
1017

1118
add_definitions(-DDUCKDB_MAJOR_VERSION=${DUCKDB_MAJOR_VERSION})

0 commit comments

Comments
 (0)