Skip to content

Commit

Permalink
do not link ICU
Browse files Browse the repository at this point in the history
Summary:
When building for Emscripten, do not even try to find or link ICU. Since
it obviously doesn't exist.

Reviewed By: avp

Differential Revision: D19804095

fbshipit-source-id: cabe695c7edd8041971f9eae71aaf35dc2c453d6
  • Loading branch information
tmikov authored and facebook-github-bot committed Feb 21, 2020
1 parent 1974e1b commit 32bb6f0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,9 @@ if (APPLE)
icucore
)
include_directories(${ICU_INCLUDE_DIRS})
elseif(EMSCRIPTEN)
# Just ignore ICU on Emiscripten. For now.
set(ICU_FOUND 1)
endif()

if (NOT ICU_FOUND)
Expand Down Expand Up @@ -395,7 +398,7 @@ endif()
function(hermes_link_icu target_name)
get_target_property(target_type ${target_name} TYPE)
target_link_libraries(${target_name} PRIVATE ${ICU_LIBRARIES})
if (HERMES_STATIC_LINK AND target_type MATCHES "EXECUTABLE|STATIC_LIBRARY")
if ((NOT EMSCRIPTEN) AND HERMES_STATIC_LINK AND target_type MATCHES "EXECUTABLE|STATIC_LIBRARY")
target_link_libraries(${target_name} PRIVATE dl pthread)
endif()

Expand Down

0 comments on commit 32bb6f0

Please sign in to comment.