Skip to content

Commit 402ffad

Browse files
committed
fix(cmake): correct G2P Support directory casing to match git repository
Previous commit b3c26d7 assumed lowercase support/common/ directories, but git repository actually stores Support/Common/ (capital S, capital C). On Windows the local build worked due to case-insensitive filesystem, but vcpkg builds from GitHub preserve git casing, causing the EXCLUDE regex /support/(Inferutil|common)/ to NOT match /Support/Common/ paths. Result: PinyinG2pTaskImplBase.cpp and Verifier.cpp were compiled into srt-g2p target (which doesn't link re2/cpp-pinyin), causing LNK2019 unresolved externals for Pinyin::setDictionaryPath and re2::RE2::~RE2. Fix: restore regex to /Support/(Inferutil|Common)/ and add_subdirectory calls to use capital Support/Common matching the git repository casing.
1 parent b3c26d7 commit 402ffad

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎lib/G2P/CMakeLists.txt‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ synthrt_declare_target(srt_g2p "${PROJECT_NAME}" ${PROJECT_VERSION} "Team OpenVP
1212
# All public classes live under namespace srt::g2p::
1313

1414
file(GLOB_RECURSE _src CONFIGURE_DEPENDS "*.cpp")
15-
list(FILTER _src EXCLUDE REGEX "/support/(Inferutil|common)/")
15+
list(FILTER _src EXCLUDE REGEX "/Support/(Inferutil|Common)/")
1616

1717
find_package(stdcorelib CONFIG REQUIRED)
1818
find_package(nlohmann_json CONFIG REQUIRED)
@@ -47,6 +47,6 @@ if(NOT TARGET srt::g2p)
4747
endif()
4848

4949
set(CMAKE_FOLDER "Libraries")
50-
add_subdirectory(support)
50+
add_subdirectory(Support)
5151

5252
synthrt_install()

‎lib/G2P/Support/CMakeLists.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@ find_package(re2 CONFIG REQUIRED)
22
find_package(cpp-pinyin CONFIG REQUIRED)
33

44
add_subdirectory(Inferutil)
5-
add_subdirectory(common)
5+
add_subdirectory(Common)

0 commit comments

Comments
 (0)