-
Notifications
You must be signed in to change notification settings - Fork 304
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HPCC-31467 Update nlp-engine version
Signed-off-by: David de Hilster <[email protected]>
- Loading branch information
1 parent
ca74c00
commit b1f3f9c
Showing
3 changed files
with
128 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
cmake_minimum_required(VERSION 3.15) | ||
|
||
# set the project name and version | ||
project(nlp-engine) | ||
|
||
set(CMAKE_CXX_STANDARD 17) | ||
|
||
find_package(ICU REQUIRED COMPONENTS data i18n io tu uc) | ||
|
||
include_directories(cs/include) | ||
include_directories(include) | ||
include_directories(include/Api) | ||
include_directories(include/Api/lite) | ||
include_directories(${ICU_INCLUDE_DIRS}) | ||
|
||
add_subdirectory(cs) | ||
add_subdirectory(src) | ||
|
||
install(DIRECTORY "${CMAKE_SOURCE_DIR}/include" DESTINATION "." FILES_MATCHING PATTERN "*.h") | ||
|
||
add_definitions( -DLITE_EXPORTS ) | ||
if(WIN32) | ||
add_definitions( -DMSVC_VERSION=${MSVC_VERSION} -D_CRT_SECURE_NO_WARNINGS ) | ||
else() | ||
add_definitions( -DLINUX -Wno-write-strings -Wno-deprecated ) | ||
endif() | ||
|
||
file(GLOB lite_src "lite/*.h" "lite/*.cpp") | ||
add_library(nlp-engine SHARED ${lite_src}) | ||
target_link_libraries(nlp-engine PRIVATE | ||
prim | ||
kbm | ||
consh | ||
words | ||
${ICU_LIBRARIES} | ||
) | ||
|
||
target_include_directories(nlp-engine | ||
INTERFACE | ||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}> | ||
$<INSTALL_INTERFACE:include/Api/lite> | ||
$<INSTALL_INTERFACE:include/Api> | ||
) | ||
|
||
install(TARGETS nlp-engine | ||
EXPORT nlp-engine-config | ||
RUNTIME DESTINATION bin | ||
ARCHIVE DESTINATION lib | ||
LIBRARY DESTINATION lib | ||
) | ||
|
||
install(EXPORT nlp-engine-config | ||
FILE nlp-engine-config.cmake | ||
DESTINATION share/cmake/nlp-engine | ||
) | ||
|
||
install( | ||
DIRECTORY ./analyzers | ||
DESTINATION share/nlp-engine | ||
COMPONENT Runtime | ||
) | ||
|
||
install( | ||
DIRECTORY ./data | ||
DESTINATION share/nlp-engine | ||
COMPONENT Runtime | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
vcpkg_from_github( | ||
OUT_SOURCE_PATH SOURCE_PATH | ||
REPO VisualText/nlp-engine | ||
REF v${VERSION} | ||
SHA512 a6871cb3db10a1d4bd7d5290141a82e788269da28b2d995963825dc4c50025e6099f5f872e4538054b7fb169773b6d6d3e73e3dd102bc3e0cbb5bddcd95ae484 | ||
HEAD_REF master | ||
) | ||
|
||
vcpkg_from_github( | ||
OUT_SOURCE_PATH ANALYZER_PATH | ||
REPO VisualText/analyzers | ||
REF v1.6.2 | ||
SHA512 07479c8ba1f36c3a0bb035af7414e96ce1477ffaa8a276256fc3749d169c0bb99f9ac9ad5c9b5b0868d634644013c46643a90598dd465e4f16bbe82a47ac60fe | ||
HEAD_REF master | ||
) | ||
|
||
vcpkg_from_github( | ||
OUT_SOURCE_PATH PARSE_EN_US_PATH | ||
REPO VisualText/parse-en-us | ||
REF v1.1.1 | ||
SHA512 1aa01c0befe82b8fe415576ae992b0b60fe51b816e93fd8f45da4c5ccacc3dc87c21373ba001cf0d0c503131b4b83346e86f1522795901bbceb07c63a52d6294 | ||
HEAD_REF master | ||
) | ||
|
||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) | ||
file(COPY "${ANALYZER_PATH}/." DESTINATION "${SOURCE_PATH}/analyzers" PATTERN "*.*") | ||
file(COPY "${PARSE_EN_US_PATH}/." DESTINATION "${SOURCE_PATH}/analyzers/parse-en-us" PATTERN "*.*") | ||
|
||
vcpkg_cmake_configure( | ||
SOURCE_PATH "${SOURCE_PATH}" | ||
) | ||
vcpkg_cmake_install() | ||
vcpkg_cmake_config_fixup(PACKAGE_NAME "nlp-engine" CONFIG_PATH "share/cmake/nlp-engine") | ||
|
||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") | ||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") | ||
|
||
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"name": "nlp-engine", | ||
"version-semver": "2.10.6", | ||
"port-version": 0, | ||
"homepage": "https://github.com/VisualText/nlp-engine", | ||
"description": "The NLP engine is a cross-platform text analysis tool that can be accessed through a command line executable or by calling its C++ functions from another language.", | ||
"dependencies": [ | ||
{ | ||
"name": "vcpkg-cmake", | ||
"host": true | ||
}, | ||
{ | ||
"name": "vcpkg-cmake-config", | ||
"host": true | ||
}, | ||
{ | ||
"name": "icu", | ||
"features": [ | ||
"tools" | ||
] | ||
} | ||
] | ||
} |