File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -5,8 +5,12 @@ project(TensorArray_Python VERSION 0.1.0 LANGUAGES C CXX)
55include (CTest)
66enable_testing ()
77
8- add_subdirectory ("third_party/pybind11" EXCLUDE_FROM_ALL )
98add_subdirectory ("tensor-array-repo/Tensor-Array" EXCLUDE_FROM_ALL )
9+
10+ find_package (Python COMPONENTS Interpreter Development)
11+
12+ if (Python_FOUND)
13+ add_subdirectory ("third_party/pybind11" EXCLUDE_FROM_ALL )
1014pybind11_add_module(tensor2 SHARED src/tensor_array/_core/tensor_bind.cc)
1115
1216target_include_directories (
@@ -19,6 +23,11 @@ SET_TARGET_PROPERTIES(tensor2 PROPERTIES PREFIX "")
1923
2024target_link_libraries (tensor2 PUBLIC TensorArray::Core)
2125
26+ else ()
27+ message (FATAL_ERROR "Python development files not found. Please install Python development package." )
28+ endif ()
29+
30+
2231set (CPACK_PROJECT_NAME ${PROJECT_NAME} )
2332set (CPACK_PROJECT_VERSION ${PROJECT_VERSION} )
2433include (CPack)
You can’t perform that action at this time.
0 commit comments