Skip to content

Commit f8f1ab1

Browse files
committed
Need to require Python3 Development.Module
1 parent a08dbb3 commit f8f1ab1

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ set(CMAKE_CXX_STANDARD 17)
2222
set(CMAKE_CXX_STANDARD_REQUIRED ON)
2323
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
2424

25+
# Check we have Python libraries & header files necessary to build modules.
26+
find_package(Python3 REQUIRED COMPONENTS Interpreter Development.Module)
27+
2528
# ~~~~~ Analyze the host's hardware & software features ~~~~~
2629

2730
# CMake normally sets CMAKE_APPLE_SILICON_PROCESSOR on Apple Silicon; however,
@@ -81,8 +84,6 @@ else()
8184
add_compile_options(-O3 -D_GLIBCXX_USE_CXX11_ABI=1)
8285
endif()
8386

84-
find_package(Python3 COMPONENTS Interpreter Development)
85-
8687
include(dev_tools/cmake/GetPybind11.cmake)
8788

8889
# Always build the basic part.

0 commit comments

Comments
 (0)