We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent bd2bbde commit b1862e2Copy full SHA for b1862e2
cmake/Modules/FindPythonExtra.cmake
@@ -26,6 +26,8 @@
26
# - PythonExtra_INCLUDE_DIRS: The paths to the directories where the Python
27
# headers are installed.
28
# - PythonExtra_LIBRARIES: The paths to the Python libraries.
29
+# - PYTHON_MODULE_EXTENSION: The full module extension, as the suffix+extension.
30
+# This is required for packages using pybind11 when crosscompiling.
31
#
32
# Example usage:
33
@@ -219,3 +221,7 @@ find_package_handle_standard_args(PythonExtra
219
221
FOUND_VAR PythonExtra_FOUND
220
222
REQUIRED_VARS ${_required_vars}
223
)
224
+
225
+if(DEFINED CMAKE_SYSROOT)
226
+ set(PYTHON_MODULE_EXTENSION ${PythonExtra_EXTENSION_SUFFIX}${PythonExtra_EXTENSION_EXTENSION})
227
+endif()
0 commit comments