Skip to content

Commit

Permalink
Update CMakeLists.txt
Browse files Browse the repository at this point in the history
  • Loading branch information
matthew-mccall committed Aug 28, 2024
1 parent 5e23a5b commit 9339ddc
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,15 @@ set(OasisC_SOURCES

if (DEFINED EMSCRIPTEN)
add_executable(OasisC ${OasisC_SOURCES})
target_link_options(OasisC PUBLIC -sSINGLE_FILE --no-entry "-sEXPORT_NAME='OasisC'" "-sEXPORTED_RUNTIME_METHODS=ccall,cwrap" "-sENVIRONMENT='web'" "--emit-tsd OasisC.d.ts")
set_target_properties(OasisC PROPERTIES SUFFIX ".mjs")
target_link_libraries(OasisC PUBLIC embind)
target_link_options(OasisC PUBLIC
--no-entry
"-sSINGLE_FILE"
"-sEXPORT_NAME='useOasis'"
"-sEXPORTED_RUNTIME_METHODS=ccall,cwrap"
"-sENVIRONMENT='web'"
"--emit-tsd OasisC.d.ts")
else ()
add_library(OasisC ${OasisC_SOURCES})
endif ()
Expand Down

0 comments on commit 9339ddc

Please sign in to comment.