diff --git a/CMakeLists.txt b/CMakeLists.txt index 0d260dd3d42585e2685e1681b9b37aac9c983c2f..57d806e16963a03566ec4945fc303149dc6545e2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -57,7 +57,7 @@ include(openblas) # packages find_package(Python3 COMPONENTS Interpreter Development) -find_package(pybind11 CONFIG) +find_package(pybind11 CONFIG REQUIRED) # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -O0 -Wall -g") diff --git a/cmake/summary.cmake b/cmake/summary.cmake index 67e8be0a964a5de4b6d9376700c2b5e8293d1d94..f04d44698911ec517cea394fc869e2db9186c17c 100644 --- a/cmake/summary.cmake +++ b/cmake/summary.cmake @@ -37,5 +37,9 @@ function (onnx_print_configuration_summary) message(STATUS " Python executable : ${Python_EXECUTABLE}") message(STATUS " Python includes : ${Python_INCLUDE_DIR}") message(STATUS " Python libraries : ${Python_LIBRARY}") - + message(STATUS " PYBIND11 : ${pybind11_FOUND}") + message(STATUS " Pybind11 version : ${pybind11_VERSION}") + message(STATUS " Pybind11 include : ${pybind11_INCLUDE_DIR}") + message(STATUS " Pybind11 includes : ${pybind11_INCLUDE_DIRS}") + message(STATUS " Pybind11 libraries : ${pybind11_LIBRARIES}") endfunction() \ No newline at end of file diff --git a/paddlespeech/audio/src/CMakeLists.txt b/paddlespeech/audio/src/CMakeLists.txt index 4249e04e2c8c2e6de864eda291bb034a447e91bf..eea07f63711271c592044b5ef593badf392398a9 100644 --- a/paddlespeech/audio/src/CMakeLists.txt +++ b/paddlespeech/audio/src/CMakeLists.txt @@ -105,7 +105,7 @@ function(define_extension name sources include_dirs libraries definitions) add_library(${name} SHARED ${sources}) target_compile_definitions(${name} PRIVATE "${definitions}") target_include_directories( - ${name} PRIVATE ${PROJECT_SOURCE_DIR} ${Python_INCLUDE_DIR} ${include_dirs}) + ${name} PRIVATE ${PROJECT_SOURCE_DIR} ${Python_INCLUDE_DIR} ${pybind11_INCLUDE_DIR} ${include_dirs}) target_link_libraries( ${name} ${libraries} diff --git a/paddlespeech/audio/src/pybind/kaldi/feature_common.h b/paddlespeech/audio/src/pybind/kaldi/feature_common.h index dbac4ceac18d82c269d0b76300de5d766d7bb9dd..05522bb7e8a82f932a0004d7f985b88ec517f3db 100644 --- a/paddlespeech/audio/src/pybind/kaldi/feature_common.h +++ b/paddlespeech/audio/src/pybind/kaldi/feature_common.h @@ -14,8 +14,8 @@ #pragma once -#include -#include +#include "pybind11/pybind11.h" +#include "pybind11/numpy.h" #include "feat/feature-window.h" namespace paddleaudio {