aboutsummaryrefslogtreecommitdiffstats
path: root/examples/samplebinding/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'examples/samplebinding/CMakeLists.txt')
-rw-r--r--examples/samplebinding/CMakeLists.txt19
1 files changed, 10 insertions, 9 deletions
diff --git a/examples/samplebinding/CMakeLists.txt b/examples/samplebinding/CMakeLists.txt
index 03ab85754..f5212c449 100644
--- a/examples/samplebinding/CMakeLists.txt
+++ b/examples/samplebinding/CMakeLists.txt
@@ -64,14 +64,15 @@ macro(pyside2_config option output_var)
endif()
endmacro()
-# Query for the shiboken path, Python path, include paths and linker flags.
-pyside2_config(--pyside2 pyside2_path)
-pyside2_config(--python-include python_include_dir)
-pyside2_config(--shiboken-include shiboken_include_dir 1)
-pyside2_config(--shiboken-shared-libraries-cmake shiboken_shared_libraries 0)
-pyside2_config(--python-link-cmake python_linking_data 0)
-
-set(shiboken_path "${pyside2_path}/shiboken2${CMAKE_EXECUTABLE_SUFFIX}")
+# Query for the shiboken generator path, Python path, include paths and linker flags.
+pyside2_config(--shiboken2-module-path shiboken2_module_path)
+pyside2_config(--shiboken2-generator-path shiboken2_generator_path)
+pyside2_config(--python-include-path python_include_dir)
+pyside2_config(--shiboken2-generator-include-path shiboken_include_dir 1)
+pyside2_config(--shiboken2-module-shared-libraries-cmake shiboken_shared_libraries 0)
+pyside2_config(--python-link-flags-cmake python_linking_data 0)
+
+set(shiboken_path "${shiboken2_generator_path}/shiboken2${CMAKE_EXECUTABLE_SUFFIX}")
if(NOT EXISTS ${shiboken_path})
message(FATAL_ERROR "Shiboken executable not found at path: ${shiboken_path}")
endif()
@@ -87,7 +88,7 @@ endif()
# Enable rpaths so that the built shared libraries find their dependencies.
set(CMAKE_SKIP_BUILD_RPATH FALSE)
set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
-set(CMAKE_INSTALL_RPATH ${pyside2_path} ${CMAKE_CURRENT_SOURCE_DIR})
+set(CMAKE_INSTALL_RPATH ${shiboken2_module_path} ${CMAKE_CURRENT_SOURCE_DIR})
set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
# =============================================================================================
# !!! End of dubious section.