Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit3ffb0e4

Browse files
dokempfJohanMabille
authored andcommitted
Use FindPython's numpy component to find numpy include directories
1 parentd4dd6ce commit3ffb0e4

File tree

2 files changed

+4
-93
lines changed

2 files changed

+4
-93
lines changed

‎CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# The full license is in the file LICENSE, distributed with this software. #
88
############################################################################
99

10-
cmake_minimum_required(VERSION3.1)
10+
cmake_minimum_required(VERSION3.14)
1111
project(xtensor-python)
1212

1313
set(CMAKE_MODULE_PATH${PROJECT_SOURCE_DIR}/cmake${CMAKE_MODULE_PATH})
@@ -60,8 +60,8 @@ else()
6060
message(STATUS"Found pybind11:${pybind11_INCLUDE_DIRS}/pybind11")
6161
endif()
6262

63-
find_package(NumPyREQUIRED)
64-
message(STATUS"Found numpy:${NUMPY_INCLUDE_DIRS}")
63+
# Look forNumPyheaders
64+
find_package(PythonREQUIREDCOMPONENTSNumPy)
6565

6666
# Build
6767
# =====
@@ -80,7 +80,7 @@ set(XTENSOR_PYTHON_HEADERS
8080

8181
add_library(xtensor-pythonINTERFACE)
8282
target_include_directories(xtensor-pythonINTERFACE
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>)
8585
target_link_libraries(xtensor-pythonINTERFACExtensor)
8686
get_target_property(inc_dirxtensor-pythonINTERFACE_INCLUDE_DIRECTORIES)

‎cmake/FindNumPy.cmake

Lines changed: 0 additions & 89 deletions
This file was deleted.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp