early-access version 2853

This commit is contained in:
pineappleEA
2022-07-23 03:01:36 +02:00
parent 1f2b5081b5
commit 1f111bb69c
8955 changed files with 418777 additions and 999 deletions

View File

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

View File

@@ -0,0 +1,32 @@
# For old projects where the minimum CMake version is lower than 3.3.
cmake_policy(SET CMP0057 NEW)
include(CMakeFindDependencyMacro)
if(TARGET libunibreak)
return()
endif()
# Compute the installation prefix relative to this file.
get_filename_component(_INSTALL_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
get_filename_component(_INSTALL_DIR "${_INSTALL_DIR}" PATH)
get_filename_component(_INSTALL_DIR "${_INSTALL_DIR}" PATH)
if(_INSTALL_DIR STREQUAL "/")
set(_INSTALL_DIR "")
endif()
add_library(unibreak INTERFACE IMPORTED GLOBAL)
add_library(libunibreak::libunibreak ALIAS unibreak)
find_library(LIBUNIBREAK_LIBRARY_DEBUG NAMES unibreak PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" PATH_SUFFIXES lib NO_DEFAULT_PATH)
if(LIBUNIBREAK_LIBRARY_DEBUG)
target_link_libraries(unibreak INTERFACE $<$<CONFIG:DEBUG>:${LIBUNIBREAK_LIBRARY_DEBUG}>)
endif()
find_library(LIBUNIBREAK_LIBRARY_RELEASE NAMES unibreak PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" PATH_SUFFIXES lib NO_DEFAULT_PATH)
target_link_libraries(unibreak INTERFACE $<$<NOT:$<CONFIG:DEBUG>>:${LIBUNIBREAK_LIBRARY_RELEASE}>)
set(LIBUNIBREAK_LIBRARY libunibreak::libunibreak PARENT_SCOPE)
set(LIBUNIBREAK_LIBRARIES libunibreak::libunibreak PARENT_SCOPE)
set(LIBUNIBREAK_INCLUDE_DIR "${_INSTALL_DIR}/include" PARENT_SCOPE)
target_include_directories(unibreak INTERFACE ${_INSTALL_DIR}/include)

View File

@@ -0,0 +1,23 @@
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO adah1972/libunibreak
REF libunibreak_5_0 # libunibreak_5_0
SHA512 909c12cf5df92f0374050fc7a0ef9e91bc1efe6a5dc5a80f4e2c81a507f1228ecaba417c3ee001e11b2422024bea68cc14eb66e08360ae69f830cdaa18764484
HEAD_REF master
)
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
OPTIONS_DEBUG -DDISABLE_INSTALL_HEADERS=ON
)
vcpkg_cmake_install()
configure_file("${CMAKE_CURRENT_LIST_DIR}/libunibreak-config.cmake.in"
"${CURRENT_PACKAGES_DIR}/share/${PORT}/libunibreak-config.cmake" @ONLY)
file(INSTALL ${SOURCE_PATH}/LICENCE DESTINATION ${CURRENT_PACKAGES_DIR}/share/libunibreak RENAME copyright)

14
externals/vcpkg/ports/libunibreak/vcpkg.json vendored Executable file
View File

@@ -0,0 +1,14 @@
{
"name": "libunibreak",
"version": "5.0",
"port-version": 1,
"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.",
"homepage": "https://github.com/adah1972/libunibreak",
"license": "zlib-acknowledgement",
"dependencies": [
{
"name": "vcpkg-cmake",
"host": true
}
]
}