My Kaldi CMakeLists.txt get an error please help me as soon as possible…
It is for lattice rescoring pytorch in kaldi
cmake_minimum_required(VERSION 3.10 FATAL_ERROR)
set(PUBLIC_HEADERS
    pytorch-rnnlm.h
)

add_library(kaldi-pyrnnlm
    pytorch-rnnlm.cc
)

#find_package(Torch REQUIRED)

#target_include_directories(kaldi-pyrnnlm PUBLIC 
#    ${PYTORCH_DIR}
#    ${PYTORCH_DIR}/bin
#    ${PYTORCH_DIR}/include
#    ${PYTORCH_DIR}/share
#
#)

target_include_directories(kaldi-pyrnnlm PUBLIC 
     $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/..>
     $<INSTALL_INTERFACE:include/kaldi>
)

target_link_libraries(kaldi-pyrnnlm PUBLIC
    kaldi-lm
    kaldi-util
    kaldi-matrix
    kaldi-base
    -lz
    -ldl
    -fPIC
    -L"/home/rakesh/rishabh_workspace/ASR/kaldi_old/tools/libtorch"
)

#target_link_libraries(kaldi-pyrnnlm "${TORCH_LIBRARIES}")
set_property(TARGET kaldi-pyrnnlm PROPERTY CXX_STANDARD 14)

install(TARGETS kaldi-pyrnnlm
    EXPORT kaldi-targets
    ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)

install(FILES ${PUBLIC_HEADERS} DESTINATION include/kaldi/pyrnnlm)


It is being called from another CMakeLists.txt . So, Can’t use the standard CMakeLists.txt
Error:
In file included from /home/rakesh/rishabh_workspace/ASR/kaldi_old/src/pyrnnlm/pytorch-rnnlm.cc:24:0:
/home/rakesh/rishabh_workspace/ASR/kaldi_old/src/pyrnnlm/../pyrnnlm/pytorch-rnnlm.h:31:10: fatal error: torch/torch.h: No such file or directory
 #include <torch/torch.h>
          ^~~~~~~~~~~~~~~
compilation terminated.
src/pyrnnlm/CMakeFiles/kaldi-pyrnnlm.dir/build.make:62: recipe for target 'src/pyrnnlm/CMakeFiles/kaldi-pyrnnlm.dir/pytorch-rnnlm.cc.o' failed
make[2]: *** [src/pyrnnlm/CMakeFiles/kaldi-pyrnnlm.dir/pytorch-rnnlm.cc.o] Error 1
CMakeFiles/Makefile2:7423: recipe for target 'src/pyrnnlm/CMakeFiles/kaldi-pyrnnlm.dir/all' failed
make[1]: *** [src/pyrnnlm/CMakeFiles/kaldi-pyrnnlm.dir/all] Error 2