File tree 2 files changed +20
-3
lines changed 2 files changed +20
-3
lines changed Original file line number Diff line number Diff line change @@ -59,13 +59,14 @@ set(${PN}_INCLUDE_DIR "${PACKAGE_PREFIX_DIR}/@CMAKE_INSTALL_INCLUDEDIR@")
59
59
set (${PN} _LIBRARY "" )
60
60
set (${PN} _DEFINITIONS USING_${PN} )
61
61
62
- check_required_components(${PN} )
63
-
64
62
# make detectable the FindPythonLibsNew.cmake module
65
63
list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR} )
66
64
67
65
include (pybind11Tools)
68
66
67
+ # Check for required components (note: found by pybind11Tools)
68
+ check_required_components(${PN} )
69
+
69
70
if (NOT (CMAKE_VERSION VERSION_LESS 3.0))
70
71
#-----------------------------------------------------------------------------
71
72
# Don't include targets if this file is being picked up by another
Original file line number Diff line number Diff line change @@ -14,7 +14,23 @@ endif()
14
14
15
15
set (Python_ADDITIONAL_VERSIONS 3.7 3.6 3.5 3.4)
16
16
find_package (PythonLibsNew ${PYBIND11_PYTHON_VERSION} REQUIRED)
17
- find_package (NumPy)
17
+ if (pybind11_FIND_QUIETLY)
18
+ set (_pybind_find_quiet QUIET )
19
+ else ()
20
+ set (_pybind_find_quiet)
21
+ endif ()
22
+ if (pybind11_FIND_COMPONENTS MATCHES NumPy)
23
+ if (pybind11_FIND_REQUIRED AND pybind11_FIND_REQUIRED_NumPy)
24
+ find_package (NumPy ${_pybind_find_quiet} REQUIRED)
25
+ else ()
26
+ find_package (NumPy ${_pybind_find_quiet} )
27
+ if (pybind11_FIND_REQUIRED_NumPy AND NOT NumPy_FOUND)
28
+ set (pybind11_NOT_FOUND_MESSAGE "pybind11 could not be found because required component NumPy could not be found." )
29
+ set (pybind11_FOUND False )
30
+ endif ()
31
+ endif ()
32
+ set (pybind11_NumPy_FOUND ${NumPy_FOUND} )
33
+ endif ()
18
34
19
35
include (CheckCXXCompilerFlag)
20
36
include (CMakeParseArguments)
You can’t perform that action at this time.
0 commit comments