From d30161e81f6d2c3cc95c6ced2d5248de56f7eedc Mon Sep 17 00:00:00 2001 From: Cristian Maureira-Fredes Date: Tue, 13 Mar 2018 16:21:05 +0100 Subject: Fix scriptableapplication build on Windows CMake failed to find shiboken2 binary (without .exe). The configuration script was unable to get information from the LIBDIR variable, since it is not set automatically on Windows, using LIBDEST if that is the case. Task-number: PYSIDE-627 Change-Id: Id8031891a2da98af33b81b0740e25299828d6fb3 Reviewed-by: Friedemann Kleint --- examples/scriptableapplication/CMakeLists.txt | 2 +- examples/scriptableapplication/pyside2_config.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) (limited to 'examples/scriptableapplication') diff --git a/examples/scriptableapplication/CMakeLists.txt b/examples/scriptableapplication/CMakeLists.txt index 6641d77c6..368fd7d25 100644 --- a/examples/scriptableapplication/CMakeLists.txt +++ b/examples/scriptableapplication/CMakeLists.txt @@ -37,7 +37,7 @@ endmacro() # Get relevant general paths, include paths and linker flags. pyside2_config(--pyside2 PYSIDE2_PATH) -set(SHIBOKEN_PATH "${PYSIDE2_PATH}/shiboken2") +set(SHIBOKEN_PATH "${PYSIDE2_PATH}/shiboken2${CMAKE_EXECUTABLE_SUFFIX}") if(NOT EXISTS ${SHIBOKEN_PATH}) message(FATAL_ERROR "Shiboken executable not found at path: ${SHIBOKEN_PATH}") diff --git a/examples/scriptableapplication/pyside2_config.py b/examples/scriptableapplication/pyside2_config.py index 361043aef..0eba6cc23 100644 --- a/examples/scriptableapplication/pyside2_config.py +++ b/examples/scriptableapplication/pyside2_config.py @@ -125,6 +125,9 @@ def pythonLinkCmake(): def pythonLinkData(): # @TODO Fix to work with static builds of Python libdir = sysconfig.get_config_var('LIBDIR') + if libdir is None: + libdir = os.path.abspath(os.path.join( + sysconfig.get_config_var('LIBDEST'), "..", "libs")) version = pythonVersion() version_no_dots = version.replace('.', '') -- cgit v1.2.3