[libunibreak] init port

This commit is contained in:
atkawa7 2017-09-02 17:09:07 -07:00
parent 8fac93e539
commit 47f329089a
3 changed files with 62 additions and 0 deletions

View File

@ -0,0 +1,35 @@
cmake_minimum_required(VERSION 3.8.0)
project(libunibreak)
set(libunibreak_srcs
src/linebreakdata.c
src/linebreakdef.c
src/wordbreak.c
src/graphemebreak.c
src/unibreakbase.c
src/unibreakdef.c
)
include_directories(src)
add_library(libunibreak ${libunibreak_srcs})
install(
TARGETS libunibreak
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
)
if(NOT DISABLE_INSTALL_HEADERS)
install(
FILES
src/linebreak.h
src/linebreakdef.h
src/wordbreak.h
src/wordbreakdef.h
DESTINATION include
)
endif()

View File

@ -0,0 +1,3 @@
Source: libunibreak
Version: 4.0
Description: an implementation of the line breaking and word breaking algorithms as described in [Unicode Standard Annex 14] 1 and [Unicode Standard Annex 29] 2. Check the project's [home page] 3 for up-to-date information.

View File

@ -0,0 +1,24 @@
include(vcpkg_common_functions)
if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic)
message(WARNING "Dynamic not supported building static")
set(VCPKG_LIBRARY_LINKAGE static)
endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO adah1972/libunibreak
REF libunibreak_4_0
SHA512 f11295133a1c65f365a5287f7377f69ac7998f19b06d44818fb55c8a5ba3edabc36de8d1b7c0d38db9d982f0e443d0a751f6d51841865094122df4cd74c9af3b
HEAD_REF master
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON
)
vcpkg_install_cmake()
file(INSTALL ${SOURCE_PATH}/LICENCE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libunibreak RENAME copyright)