-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathhflt.cmake.in
28 lines (22 loc) · 991 Bytes
/
hflt.cmake.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
@PACKAGE_INIT@
include( "${CMAKE_CURRENT_LIST_DIR}/hfltTargets.cmake" )
# add sentencepiece, consider making this a Find*.cmake file
if (DEFINED ENV{SENTENCEPIECE_ROOT})
set(SENTENCEPIECE_ROOT $ENV{SENTENCEPIECE_ROOT})
else()
set(SENTENCEPIECE_ROOT ${PROJECT_SOURCE_DIR}/third_party/local)
endif()
find_library(SENTENCEPIECE_LIBRARIES
NAMES sentencepiece libsentencepiece
PATHS "${PROJECT_SOURCE_DIR}/third_party/local"
HINTS "${SENTENCEPIECE_ROOT}/lib")
set(SENTENCEPIECE_INCLUDE_DIRS ${SENTENCEPIECE_ROOT}/include)
include_directories(${SENTENCEPIECE_INCLUDE_DIRS})
# add boost tokenizer, which is header only so no components needed to be specified
# https://stackoverflow.com/questions/6646405/how-do-you-add-boost-libraries-in-cmakelists-txt
find_package(Boost 1.45.0)
include_directories(${Boost_INCLUDE_DIRS})
# add torch
find_package(Torch REQUIRED)
# add nlohmann json
find_package(nlohmann_json PATHS "${PROJECT_SOURCE_DIR}/third_party/local" REQUIRED)