Skip to content

Commit 1d88f38

Browse files
authoredMay 14, 2021
python development is not always required (#43212)
* python dev not always required * simpler approach
1 parent 32af810 commit 1d88f38

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed
 

‎CMakeLists.txt

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -941,7 +941,13 @@ set(QGIS_INSTALL_SYS_LIBS TRUE CACHE BOOL "If set to TRUE install all required s
941941
set(MIN_PYTHON_VERSION "3.7")
942942
set(Python_FIND_FRAMEWORK "LAST")
943943

944-
find_package(Python ${MIN_PYTHON_VERSION} REQUIRED COMPONENTS Interpreter Development)
944+
945+
if (WITH_BINDINGS)
946+
find_package(Python ${MIN_PYTHON_VERSION} REQUIRED COMPONENTS Interpreter Development)
947+
else()
948+
find_package(Python ${MIN_PYTHON_VERSION} REQUIRED COMPONENTS Interpreter)
949+
endif()
950+
945951
message("-- Found Python executable: ${Python_EXECUTABLE} (version ${Python_VERSION})")
946952
message("-- Python library: ${Python_LIBRARIES}")
947953
message("-- Python site-packages: ${Python_SITEARCH}")

0 commit comments

Comments
 (0)
Please sign in to comment.