1. Home
  2. ›
  3. Browse
  4. ›
  5. cpp-pinyin

cpp-pinyin

v2.0.0#0Latest

A lightweight Chinese/Cantonese to Pinyin library.

Install

Run the following Vcpkg command to install the port.

vcpkg install cpp-pinyin

Usage

cpp-pinyin provides CMake targets:

find_package(cpp-pinyin2 CONFIG REQUIRED)

target_link_libraries(main PRIVATE cpp-pinyin2::cpp-pinyin2)

The dictionaries are in CPP_PINYIN2_DICT_DIR. To deploy them beside your application:

add_custom_command(TARGET main POST_BUILD

  COMMAND "${CMAKE_COMMAND}" -E copy_directory
    "${CPP_PINYIN2_DICT_DIR}"
    "$<TARGET_FILE_DIR:main>/dict"

)

Pass the deployed dictionary directory to Engine::open.

cpp-pinyin provides pkg-config modules:

# A lightweight Chinese/Cantonese to Pinyin library.

cpp-pinyin2

Dependencies

See source

Version

v2.0.0#0

Publication

Supports

All

GitHub

wolfgitpr/cpp-pinyin

Homepage

github.com/wolfgitpr/cpp-pinyin

Subtree

3c0b120f8b

License

Apache-2.0andCC-BY-SA-4.0andCC-BY-SA-3.0

Definition

Manifest