question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Embed ICU from CMake

See original GitHub issue

Current *nix builds allow for embedding of ICU library into the build via --embed-icu switch. What this does - it invokes an additional script from the build script, followed by configure and make:

https://github.com/microsoft/ChakraCore/blob/master/build.sh#L411 https://github.com/microsoft/ChakraCore/blob/master/tools/icu/configure.py

CMake can take care of that via ExternalProject module, which would eliminate ICU download script and greatly reduce the corresponding section of the build script.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ppenzincommented, Apr 22, 2020

As a couple of extra side notes on macOS; icu does come pre-installed so it should in theory be possible to detect and use that version BUT for whatever reason the --system-icu flag to build.sh doesn’t work AND providing a path to the pre-installed ICU via the flag for that also doesn’t seem to work (builds but fails to load at runtime). Whilst the --embed-icu flag works perfectly.

OSX build seems to ignore system ICU, and not setting ICU_LIBRARIES.

In fact we are not actively looking for the library, unless ICU_INCLUDE_PATH is specified. Even for Linux there is no actual detection of ICU being present on the system.

CMake 3.7 introduced a module for ICU detection. But even for older versions, we can put together a mechanism to detect it using find_library.

0reactions
jackhortoncommented, Apr 20, 2020

configure.py is used in ad-hoc ICU-enabled Windows builds – its a manual pre-build step if you want to use non-system ICU on Windows. We never got around to using ICU in ChakraCore windows builds due to licensing and build system complexity that we didnt have time to address, but in theory, that will be a requirement if CC wants to stay up to date with the Intl spec, since there just isnt support for some of the primitives required by newer APIs (like formatToParts)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Embed ICU from CMake #6424 - chakra-core/ChakraCore
CMake 3.7 introduced a module for ICU detection. But even for older versions, we can put together a mechanism to detect it using...
Read more >
How to add ICU library to project? - cmake
Using CMake 3.13. ... This problem was solved by adding the file FindICU.cmake at top of the ... INSERT these lines ONLY AFTER...
Read more >
Building ICU4C | ICU Documentation
You can build ICU from the command line instead of using the Visual Studio GUI. Assuming that you have properly installed Visual Studio...
Read more >
CMakeLists.txt
todo: create a sub cmake file to take care of _SH uncaching. ... message(FATAL_ERROR "Embedded ICU and ICU include path cannot be set...
Read more >
Build System Changes in Qt 6 | Qt 6.4
You need a recent version of CMake to configure and build Qt. For Qt 6.0, ... from the command line with various assignments...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found