aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/data/shiboken_helpers.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken2/data/shiboken_helpers.cmake')
-rw-r--r--sources/shiboken2/data/shiboken_helpers.cmake3
1 files changed, 2 insertions, 1 deletions
diff --git a/sources/shiboken2/data/shiboken_helpers.cmake b/sources/shiboken2/data/shiboken_helpers.cmake
index f4dd4d5dc..780509f58 100644
--- a/sources/shiboken2/data/shiboken_helpers.cmake
+++ b/sources/shiboken2/data/shiboken_helpers.cmake
@@ -13,8 +13,9 @@ macro(shiboken_check_if_limited_api)
# On other platforms, this result is not used at all.
execute_process(
COMMAND ${PYTHON_EXECUTABLE} -c "if True:
+ import os
for lib in '${PYTHON_LIBRARIES}'.split(';'):
- if '/' in lib:
+ if '/' in lib and os.path.isfile(lib):
prefix, py = lib.rsplit('/', 1)
if py.startswith('python3'):
print(prefix + '/python3.lib')