feat: do not generate leanstatic.a in EMSCRIPTEN build

This commit is contained in:
Soonho Kong 2015-11-03 18:22:05 -05:00
parent d508ceccec
commit a25b43f1e8
2 changed files with 5 additions and 3 deletions

View file

@ -364,7 +364,9 @@ if(MULTI_THREAD AND (NOT ("${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")) AND (NOT BOO
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pthread")
endif()
set(CMAKE_EXE_LINKER_FLAGS_TESTCOV "${CMAKE_EXE_LINKER_FLAGS} -fprofile-arcs -ftest-coverage")
add_library(leanstatic ${LEAN_OBJS})
if(NOT EMSCRIPTEN)
add_library(leanstatic ${LEAN_OBJS})
endif()
if ((${CYGWIN} EQUAL "1") OR (${CMAKE_SYSTEM_NAME} MATCHES "Windows"))
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--export-all")
endif()

View file

@ -1,6 +1,6 @@
if(${EMSCRIPTEN})
add_executable(lean.js lean.cpp emscripten.cpp)
target_link_libraries(lean.js leanstatic ${EXTRA_LIBS} "--embed-file library --memory-init-file 0")
add_executable(lean.js lean.cpp emscripten.cpp ${LEAN_OBJS})
target_link_libraries(lean.js ${EXTRA_LIBS} "--embed-file library --memory-init-file 0")
else()
add_executable(lean lean.cpp emscripten.cpp)
target_link_libraries(lean leanstatic ${EXTRA_LIBS})