Skip to content

Commit

Permalink
fmt cmake emscripten optimise commands / fmt cmake style
Browse files Browse the repository at this point in the history
  • Loading branch information
danoli3 committed Feb 19, 2024
1 parent 91201e0 commit 211493e
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -421,21 +421,12 @@ if (FMT_TEST)
add_subdirectory(test)
endif ()

if(EMSCRIPTEN)
set(FMT_WASM_SOURCES
${FMT_SOURCES}
${FMT_HEADERS}
)
add_executable(fmt_wasm
${FMT_WASM_SOURCES}
)
target_include_directories(fmt_wasm PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/include
)
set_target_properties(fmt_wasm PROPERTIES COMPILE_FLAGS "-Os -s SIDE_MODULE=1 ")
set_target_properties(fmt_wasm PROPERTIES LINK_FLAGS "-Os -s WASM=1 -s SIDE_MODULE=1 -s STANDALONE_WASM --no-entry")
if (EMSCRIPTEN)
add_executable(fmt_wasm ${FMT_SOURCES} ${FMT_HEADERS})
target_include_directories(fmt_wasm PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include)
set_target_properties(fmt_wasm PROPERTIES COMPILE_FLAGS "-s SIDE_MODULE=1 ")
set_target_properties(fmt_wasm PROPERTIES LINK_FLAGS "-s WASM=1 -s SIDE_MODULE=1 -s STANDALONE_WASM --no-entry")
set(CMAKE_EXECUTABLE_SUFFIX ".wasm")

endif()


Expand Down

0 comments on commit 211493e

Please sign in to comment.