提交 a7181bcd 编写于 作者: H Hui Zhang

fix pybind11/numpy.h not found

上级 3bb904bd
...@@ -57,7 +57,7 @@ include(openblas) ...@@ -57,7 +57,7 @@ include(openblas)
# packages # packages
find_package(Python3 COMPONENTS Interpreter Development) 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") # set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread -O0 -Wall -g")
......
...@@ -37,5 +37,9 @@ function (onnx_print_configuration_summary) ...@@ -37,5 +37,9 @@ function (onnx_print_configuration_summary)
message(STATUS " Python executable : ${Python_EXECUTABLE}") message(STATUS " Python executable : ${Python_EXECUTABLE}")
message(STATUS " Python includes : ${Python_INCLUDE_DIR}") message(STATUS " Python includes : ${Python_INCLUDE_DIR}")
message(STATUS " Python libraries : ${Python_LIBRARY}") 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() endfunction()
\ No newline at end of file
...@@ -105,7 +105,7 @@ function(define_extension name sources include_dirs libraries definitions) ...@@ -105,7 +105,7 @@ function(define_extension name sources include_dirs libraries definitions)
add_library(${name} SHARED ${sources}) add_library(${name} SHARED ${sources})
target_compile_definitions(${name} PRIVATE "${definitions}") target_compile_definitions(${name} PRIVATE "${definitions}")
target_include_directories( 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( target_link_libraries(
${name} ${name}
${libraries} ${libraries}
......
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
#pragma once #pragma once
#include <pybind11/numpy.h> #include "pybind11/pybind11.h"
#include <pybind11/pybind11.h> #include "pybind11/numpy.h"
#include "feat/feature-window.h" #include "feat/feature-window.h"
namespace paddleaudio { namespace paddleaudio {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册