Skip to content

semenovf/common-lib

Repository files navigation

Standard License Build status

common-lib (Common library for Portable Foundation Structures)

Quick Reference

pfs::any

Purpose: a type-safe container for single values of any copy constructible type. See also: std::any (C++17) Details: it is a typedef for std::any (if the compiler meets the requirements of at least the C++17 standard) or it is typedef for stx::any () otherwise Usage example:

pfs::argvapi

Purpose: command line interface simple API.

I18N support

Call cmake with PFS__ENABLE_NLS to enable NLS support:

$ cmake ... -DPFS__ENABLE_NLS=ON ...
...

if (TARGET <TARGET>)
    # Target `libintl` available if `PFS__ENABLE_NLS` is ON 
    # and `PFS__USE_IMPORTED_GETTEXT_LIB` is ON (on Windows platform)
    if (TARGET libintl)
        portable_target(LINK <TARGET> PRIVATE libintl)
        
        add_custom_command(TARGET <TARGET>
            POST_BUILD
            COMMAND ${CMAKE_COMMAND} -E copy 
                "$<TARGET_PROPERTY:libintl,IMPORTED_LOCATION>"
                "$<TARGET_FILE_DIR:<TARGET>>"
            COMMAND ${CMAKE_COMMAND} -E copy 
                "$<TARGET_PROPERTY:libintl,ICONV_LIB>"
                "$<TARGET_FILE_DIR:<TARGET>>"
            VERBATIM)
    endif()
endif()
...

Install ICU

Windows

Required ICU version 71.1. Build from sources required python 3.

Note. The path to sources must not contain spaces. There was a problem building ICU library.

Using prebuilt binaries (not implemented yet)

  1. Download them from git repository:

About

Common library for Portable Foundation Structures

Resources

License

Stars

Watchers

Forks

Packages

No packages published