File tree Expand file tree Collapse file tree 2 files changed +4
-93
lines changed Expand file tree Collapse file tree 2 files changed +4
-93
lines changed Original file line number Diff line number Diff line change 77# The full license is in the file LICENSE, distributed with this software. #
88############################################################################
99
10- cmake_minimum_required (VERSION 3.1 )
10+ cmake_minimum_required (VERSION 3.14 )
1111project (xtensor-python)
1212
1313set (CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR} /cmake ${CMAKE_MODULE_PATH} )
6060 message (STATUS "Found pybind11: ${pybind11_INCLUDE_DIRS} /pybind11" )
6161endif ()
6262
63- find_package ( NumPy REQUIRED)
64- message ( STATUS "Found numpy: ${NUMPY_INCLUDE_DIRS} " )
63+ # Look for NumPy headers
64+ find_package (Python REQUIRED COMPONENTS NumPy )
6565
6666# Build
6767# =====
@@ -80,7 +80,7 @@ set(XTENSOR_PYTHON_HEADERS
8080
8181add_library (xtensor-python INTERFACE )
8282target_include_directories (xtensor-python INTERFACE
83- "$<BUILD_INTERFACE:${XTENSOR_PYTHON_INCLUDE_DIR} ;${pybind11_INCLUDE_DIRS} ;${NUMPY_INCLUDE_DIRS } >"
83+ "$<BUILD_INTERFACE:${XTENSOR_PYTHON_INCLUDE_DIR} ;${pybind11_INCLUDE_DIRS} ;${Python_NumPy_INCLUDE_DIRS } >"
8484 $<INSTALL_INTERFACE:include >)
8585target_link_libraries (xtensor-python INTERFACE xtensor)
8686get_target_property (inc_dir xtensor-python INTERFACE_INCLUDE_DIRECTORIES )
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments