diff options
author | Shyamnath Premnadh <[email protected]> | 2025-07-02 11:10:01 +0200 |
---|---|---|
committer | Shyamnath Premnadh <[email protected]> | 2025-07-04 11:23:27 +0200 |
commit | 662917b9439bea5a2784a19aa827f7d85a5e3cc5 (patch) | |
tree | 3ceee11cd46267f5430d1cffda37f9b4f1ea7b08 | |
parent | 77c37b1937c9500a2af5a1bed2366058de74d1b7 (diff) |
PySide: Modify samplebinding, widgetbinding and scriptableapplication
- With 6e7e6565024 the libshiboken headers were moved from
`shiboken_generator/include` to `shiboken/include` in the installation
directory. The reason behind this was libshiboken binary was shipped
with shiboken and not shiboken_generator.
- Update utils/pyside_config.py to return --shiboken-include-path
instead of --shiboken-generator-include-path, which is used
by samplebinding and scriptableapplication examples.
- Additionally, add some debug messages to the CMakeLists.txt files
of both examples to print the computed variables.
Change-Id: Ie88283e074ba73d1103a66fe7cf6923a1a9fa048
Reviewed-by: Cristian Maureira-Fredes <[email protected]>
-rw-r--r-- | examples/samplebinding/CMakeLists.txt | 10 | ||||
-rw-r--r-- | examples/scriptableapplication/CMakeLists.txt | 15 | ||||
-rw-r--r-- | examples/utils/pyside_config.py | 6 | ||||
-rw-r--r-- | examples/widgetbinding/CMakeLists.txt | 13 |
4 files changed, 37 insertions, 7 deletions
diff --git a/examples/samplebinding/CMakeLists.txt b/examples/samplebinding/CMakeLists.txt index 4807904c1..e9b8a2de5 100644 --- a/examples/samplebinding/CMakeLists.txt +++ b/examples/samplebinding/CMakeLists.txt @@ -90,10 +90,18 @@ endmacro() pyside_config(--shiboken-module-path shiboken_module_path) pyside_config(--shiboken-generator-path shiboken_generator_path) pyside_config(--python-include-path python_include_dir) -pyside_config(--shiboken-generator-include-path shiboken_include_dir 1) +pyside_config(--shiboken-include-path shiboken_include_dir 1) pyside_config(--shiboken-module-shared-libraries-cmake shiboken_shared_libraries 0) pyside_config(--python-link-flags-cmake python_linking_data 0) +# Print the computed variables +message(STATUS "Shiboken module path: ${shiboken_module_path}") +message(STATUS "Shiboken generator path: ${shiboken_generator_path}") +message(STATUS "Python include path: ${python_include_dir}") +message(STATUS "Shiboken include path: ${shiboken_include_dir}") +message(STATUS "Shiboken shared libraries: ${shiboken_shared_libraries}") +message(STATUS "Python linking data: ${python_linking_data}") + set(shiboken_path "${shiboken_generator_path}/shiboken6${CMAKE_EXECUTABLE_SUFFIX}") if(NOT EXISTS ${shiboken_path}) message(FATAL_ERROR "Shiboken executable not found at path: ${shiboken_path}") diff --git a/examples/scriptableapplication/CMakeLists.txt b/examples/scriptableapplication/CMakeLists.txt index fbfa00b98..18bb17c42 100644 --- a/examples/scriptableapplication/CMakeLists.txt +++ b/examples/scriptableapplication/CMakeLists.txt @@ -65,13 +65,24 @@ pyside_config(--shiboken-generator-path SHIBOKEN_GENERATOR_PATH) pyside_config(--pyside-path PYSIDE_PATH) pyside_config(--python-include-path PYTHON_INCLUDE_DIR) -pyside_config(--shiboken-generator-include-path SHIBOKEN_GENERATOR_INCLUDE_DIR 1) +pyside_config(--shiboken-include-path SHIBOKEN_INCLUDE_DIR 1) pyside_config(--pyside-include-path PYSIDE_INCLUDE_DIR 1) pyside_config(--python-link-flags-cmake PYTHON_LINKING_DATA 0) pyside_config(--shiboken-module-shared-libraries-cmake SHIBOKEN_MODULE_SHARED_LIBRARIES 0) pyside_config(--pyside-shared-libraries-cmake PYSIDE_SHARED_LIBRARIES 0) +# Print the computed variables +message(STATUS "Shiboken module path: ${SHIBOKEN_MODULE_PATH}") +message(STATUS "Shiboken generator path: ${SHIBOKEN_GENERATOR_PATH}") +message(STATUS "PySide path: ${PYSIDE_PATH}") +message(STATUS "Python include path: ${PYTHON_INCLUDE_DIR}") +message(STATUS "Shiboken include path: ${SHIBOKEN_INCLUDE_DIR}") +message(STATUS "PySide include path: ${PYSIDE_INCLUDE_DIR}") +message(STATUS "Python linking data: ${PYTHON_LINKING_DATA}") +message(STATUS "Shiboken module shared libraries: ${SHIBOKEN_MODULE_SHARED_LIBRARIES}") +message(STATUS "PySide shared libraries: ${PYSIDE_SHARED_LIBRARIES}") + set(SHIBOKEN_PATH "${SHIBOKEN_GENERATOR_PATH}/shiboken6${CMAKE_EXECUTABLE_SUFFIX}") if(NOT EXISTS ${SHIBOKEN_PATH}) @@ -167,7 +178,7 @@ target_sources(${PROJECT_NAME} PUBLIC ${SOURCES}) # Apply relevant include and link flags. target_include_directories(${PROJECT_NAME} PRIVATE ${PYTHON_INCLUDE_DIR}) -target_include_directories(${PROJECT_NAME} PRIVATE ${SHIBOKEN_GENERATOR_INCLUDE_DIR}) +target_include_directories(${PROJECT_NAME} PRIVATE ${SHIBOKEN_INCLUDE_DIR}) target_include_directories(${PROJECT_NAME} PRIVATE ${PYSIDE_INCLUDE_DIR}) target_include_directories(${PROJECT_NAME} PRIVATE ${PYSIDE_ADDITIONAL_INCLUDES}) target_include_directories(${PROJECT_NAME} PRIVATE ${CMAKE_SOURCE_DIR}) diff --git a/examples/utils/pyside_config.py b/examples/utils/pyside_config.py index c4bb873ee..ea021030f 100644 --- a/examples/utils/pyside_config.py +++ b/examples/utils/pyside_config.py @@ -49,10 +49,10 @@ options.append(("--python-include-path", lambda: get_python_include_path(), python_include_error, "Print Python include path")) -options.append(("--shiboken-generator-include-path", - lambda: get_package_include_path(Package.SHIBOKEN_GENERATOR), +options.append(("--shiboken-include-path", + lambda: get_package_include_path(Package.SHIBOKEN_MODULE), pyside_error, - "Print shiboken generator include paths")) + "Print shiboken module include paths")) options.append(("--pyside-include-path", lambda: get_package_include_path(Package.PYSIDE_MODULE), pyside_error, diff --git a/examples/widgetbinding/CMakeLists.txt b/examples/widgetbinding/CMakeLists.txt index 1c5eefa50..f65c19d1e 100644 --- a/examples/widgetbinding/CMakeLists.txt +++ b/examples/widgetbinding/CMakeLists.txt @@ -100,11 +100,22 @@ pyside_config(--shiboken-generator-path shiboken_generator_path) pyside_config(--pyside-path pyside_path) pyside_config(--pyside-include-path pyside_include_dir 1) pyside_config(--python-include-path python_include_dir) -pyside_config(--shiboken-generator-include-path shiboken_include_dir 1) +pyside_config(--shiboken-include-path shiboken_include_dir 1) pyside_config(--shiboken-module-shared-libraries-cmake shiboken_shared_libraries 0) pyside_config(--python-link-flags-cmake python_linking_data 0) pyside_config(--pyside-shared-libraries-cmake pyside_shared_libraries 0) +# Print the computed variables +message(STATUS "Shiboken module path: ${shiboken_module_path}") +message(STATUS "Shiboken generator path: ${shiboken_generator_path}") +message(STATUS "PySide path: ${pyside_path}") +message(STATUS "PySide include dir: ${pyside_include_dir}") +message(STATUS "Python include path: ${python_include_dir}") +message(STATUS "Shiboken include dir: ${shiboken_include_dir}") +message(STATUS "Shiboken shared libraries: ${shiboken_shared_libraries}") +message(STATUS "Python linking data: ${python_linking_data}") +message(STATUS "PySide shared libraries: ${pyside_shared_libraries}") + set(shiboken_path "${shiboken_generator_path}/shiboken6${CMAKE_EXECUTABLE_SUFFIX}") if(NOT EXISTS ${shiboken_path}) message(FATAL_ERROR "Shiboken executable not found at path: ${shiboken_path}") |