Package: libpyside2-dev Version: 5.13.2-2.2+b1 Severity: normal Dear Maintainer!
I noticed that my build fails because of this error: CMake Error in src/Gui/CMakeLists.txt: Imported target "PySide2::pyside2" includes non-existent path "/usr/lib/include/PySide2" in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include: * The path was deleted, renamed, or moved to another location. * An install or uninstall procedure did not complete successfully. * The installation package was faulty and references files it does not provide. The correct path should be /usr/include/PySide2 and a quick check using the attached CMake script shows that indeed the wrong path is set: cmake .. -- PySide2Config: Using default python: .cpython-38-x86_64-linux-gnu [...] PySide2::pyside2 INTERFACE_INCLUDE_DIRECTORIES = /usr/lib/include/PySide2 [...] Best regards Sebastian -- System Information: Debian Release: bullseye/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 5.4.0-3-amd64 (SMP w/4 CPU cores) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=de_AT.UTF-8, LC_CTYPE=de_AT.UTF-8 (charmap=UTF-8), LANGUAGE=de_AT.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages libpyside2-dev depends on: ii libpyside2-py3-5.13 5.13.2-2.2+b1 libpyside2-dev recommends no packages. libpyside2-dev suggests no packages. -- no debconf information
cmake_minimum_required(VERSION 3.3 FATAL_ERROR) project(Test) find_package(PySide2) # From https://stackoverflow.com/a/34292622/446140 get_property(PYSIDE_INCLUDE_DIR TARGET PySide2::pyside2 PROPERTY INTERFACE_INCLUDE_DIRECTORIES) # Get all propreties that cmake supports execute_process(COMMAND cmake --help-property-list OUTPUT_VARIABLE CMAKE_PROPERTY_LIST) # Convert command output into a CMake list STRING(REGEX REPLACE ";" "\\\\;" CMAKE_PROPERTY_LIST "${CMAKE_PROPERTY_LIST}") STRING(REGEX REPLACE "\n" ";" CMAKE_PROPERTY_LIST "${CMAKE_PROPERTY_LIST}") function(print_properties) message ("CMAKE_PROPERTY_LIST = ${CMAKE_PROPERTY_LIST}") endfunction(print_properties) function(print_target_properties tgt) if(NOT TARGET ${tgt}) message("There is no target named '${tgt}'") return() endif() foreach (prop ${CMAKE_PROPERTY_LIST}) string(REPLACE "<CONFIG>" "${CMAKE_BUILD_TYPE}" prop ${prop}) # Fix https://stackoverflow.com/questions/32197663/how-can-i-remove-the-the-location-property-may-not-be-read-from-target-error-i if(prop STREQUAL "LOCATION" OR prop MATCHES "^LOCATION_" OR prop MATCHES "_LOCATION$") continue() endif() # message ("Checking ${prop}") get_property(propval TARGET ${tgt} PROPERTY ${prop} SET) if (propval) get_target_property(propval ${tgt} ${prop}) message ("${tgt} ${prop} = ${propval}") endif() endforeach(prop) endfunction(print_target_properties) print_target_properties(PySide2::pyside2)