Closed veelion closed 1 year ago
without this change, kaldifeat's pybind11.cmake conflicts with wenet(and k2)'s pybind11.cmake, so just turn it OFF
What are the error messages for that?
without this change, kaldifeat's pybind11.cmake conflicts with wenet(and k2)'s pybind11.cmake, so just turn it OFF
What are the error messages for that?
CMake Error at fc_base/kaldifeat-src/kaldifeat/python/csrc/CMakeLists.txt:2 (pybind11_add_module): Unknown CMake command "pybind11_add_module".
wenet/runtime/libtorch only use C++ without
include(pybind11)
. kaldifeat also did not as a dependented project:
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR) # this is false in other projects, e.g. wenet
include(pybind11)
endif()
but kaldifeat/kaldifeat/CMakeLists.txt
: add_subdirectory(python)
, so got the error Unknown CMake command pybind11_add_module".
K2 has include pybind11 before include(kaldifeat)
, so it has no error.
I see.
Thanks for your contribution!
Thank you. Would you like to make a new release, so that I can link to the new zip file in cmake.
Thank you. Would you like to make a new release, so that I can link to the new zip file in cmake.
Please see https://github.com/csukuangfj/kaldifeat/releases/tag/v1.21
Thanks.
I use the C++ API in wenet runtime with FetchContent. But kaldifeat's CMakeLists.txt use CMAKE_SOURCE_DIR, which is path to wenet/runtime/libtorch, then kaldifeat couldn't find its own cmake module. so, I make two changes to make kaldifeat working fine as a dependenty project to other projects.:
kaldifeat_BUILD_PYMODULE
, which can be set OFF by other projects. we only use C++ api, but kaldifeat default to build python module byadd_subdirectory(python)
But, without these changes, kaldifeat works fine with k2, why? Because there're cmake modules in
k2/cmake/
used by kaldifeat, in other words, kaldifeat use k2's cmake modules not its own.With the 2nd change, k2 needs setk2 needs no change.kaldifeat_BUILD_PYMODULE
to OFF in k2/cmake/kaldifeat.cmake.