Skip to content

Commit 0dde42c

Browse files
committed
wasm: fix ninja build
1 parent 41e04d3 commit 0dde42c

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,11 @@ if(WIN32)
4141
target_compile_definitions(lbug INTERFACE LBUG_STATIC_DEFINE)
4242
endif()
4343

44-
if(NOT WIN32)
44+
if(EMSCRIPTEN)
45+
# Emscripten forces SHARED->STATIC, so give it a distinct name to avoid
46+
# two targets both emitting liblbug.a (Ninja rejects duplicate rules).
47+
set_target_properties(lbug_shared PROPERTIES OUTPUT_NAME lbug_shared)
48+
elseif(NOT WIN32)
4549
set_target_properties(lbug_shared PROPERTIES OUTPUT_NAME lbug)
4650
endif()
4751

0 commit comments

Comments
 (0)