Skip to content

Commit 940d500

Browse files
committed
Fix warning
1 parent 6b0446b commit 940d500

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

api/python/CMakeLists.txt

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
find_package(Python REQUIRED COMPONENTS Interpreter Development.Module)
21

32
if (LIEF_PY_LIEF_EXT)
43
if (LIEF_PY_LIEF_EXT_SHARED)
@@ -21,6 +20,7 @@ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0")
2120
endif()
2221

2322
if (LIEF_EXTERNAL_NANOBIND)
23+
find_package(Python REQUIRED COMPONENTS Interpreter Development.Module)
2424
find_package(nanobind REQUIRED)
2525
else()
2626
set(NANOBIND_VERSION 2.6.1.r32.g4a0b83a)
@@ -31,11 +31,13 @@ else()
3131
URL ${NANOBIND_URL}
3232
URL_HASH ${NANOBIND_SHA256}
3333
)
34-
FetchContent_Populate(nanobind)
34+
FetchContent_MakeAvailable(nanobind)
35+
find_package(Python REQUIRED COMPONENTS Interpreter Development.Module)
3536
find_package(nanobind REQUIRED PATHS ${nanobind_SOURCE_DIR}/cmake
3637
NO_DEFAULT_PATH)
3738
endif()
3839

40+
3941
message(STATUS "Python version: ${Python_VERSION}")
4042
message(STATUS "Python lib: ${Python_LIBRARIES}")
4143
message(STATUS "Python include: ${Python_INCLUDE_DIRS}")

0 commit comments

Comments
 (0)