Skip to content

Commit c4fa465

Browse files
committed
Try a different python find_package.
1 parent 95d14a8 commit c4fa465

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

CMakeLists.txt

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,10 @@ if (WIN32)
2323
endif()
2424
endif()
2525

26-
find_package (Python COMPONENTS Interpreter Development REQUIRED)
27-
28-
if (NOT Python_Development_FOUND)
29-
message(FATAL_ERROR "Python3 include directory not found!")
30-
endif()
26+
# Try to import all Python components potentially needed by nanobind
27+
find_package(Python 3.8
28+
REQUIRED COMPONENTS Interpreter Development.Module
29+
OPTIONAL_COMPONENTS Development.SABIModule)
3130

3231
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
3332
set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build." FORCE)

0 commit comments

Comments
 (0)