Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fatal error: 'pyside2_global.h' file not found #142

Closed
jendrikw opened this issue Nov 21, 2018 · 10 comments
Closed

fatal error: 'pyside2_global.h' file not found #142

jendrikw opened this issue Nov 21, 2018 · 10 comments

Comments

@jendrikw
Copy link

I'm trying to compile ros-melodic via the arch linux package on the AUR (https://aur.archlinux.org/packages/ros-melodic-qt-gui-cpp/), but I get the following error:

-- Using CATKIN_DEVEL_PREFIX: /home/jendrik/.cache/aursync/ros-melodic-qt-gui-cpp/src/build/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/melodic
-- This workspace overlays: /opt/ros/melodic
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.7.1", minimum required is "2") 
-- Using PYTHON_EXECUTABLE: /usr/bin/python3
-- Using default Python package layout
-- Using empy: /usr/lib/python3.7/site-packages/em.py
-- Using CATKIN_ENABLE_TESTING: ON
-- Skip enable_testing() when building binary package
-- Using CATKIN_TEST_RESULTS_DIR: /home/jendrik/.cache/aursync/ros-melodic-qt-gui-cpp/src/build/test_results
-- Found gtest: gtests will be built
-- Using Python nosetests: /usr/bin/nosetests-3.7
-- catkin 0.7.14
-- Boost version: 1.68.0
-- Found the following Boost libraries:
--   filesystem
--   system
-- Shiboken2Config: Using default python: .cpython-37m-x86_64-linux-gnu
-- libshiboken built for Release
Using SHIBOKEN_LIBRARY: /usr/lib/libshiboken2.cpython-37m-x86_64-linux-gnu.so
Using PYSIDE_LIBRARY: /usr/lib/libpyside2.cpython-37m-x86_64-linux-gnu.so
-- Shiboken binding generator available.
-- Found PythonInterp: /usr/bin/python3 (found suitable version "3.7.1", minimum required is "3.7") 
-- SIP binding generator available.
-- Python binding generators: shiboken;sip
-- Configuring done
-- Generating done
-- Build files have been written to: /home/jendrik/.cache/aursync/ros-melodic-qt-gui-cpp/src/build
[ 45%] Built target qt_gui_cpp
[ 48%] Running Shiboken generator for libqt_gui_cpp Python bindings...
[ 51%] Meta target for qt_gui_cpp_sip Python bindings...
[ 57%] Built target libqt_gui_cpp_sip
qt.shiboken: (typesystem) Unknown attribute for 'add-function': 'allow-thread'
qt.shiboken: (typesystem) CLANG builtins includes directory: /usr/lib/clang/7.0.0/include
(typesystem) clang_parseTranslationUnit2(0x0, cmd[13]=-isystem/usr/lib/clang/7.0.0/include -fPIC -Wno-constant-logical-operand -std=c++14 -I/home/jendrik/.cache/aursync/ros-melodic-qt-gui-cpp/src/qt_gui_core-release-release-melodic-qt_gui_cpp-0.3.11-0/src/qt_gui_cpp_shiboken/../../include -I -I/usr/include/qt/ -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I/usr/lib/qt//mkspecs/linux-g++ -I/usr/include /tmp/global_XHYeMq.hpp)
/home/jendrik/.cache/aursync/ros-melodic-qt-gui-cpp/src/qt_gui_core-release-release-melodic-qt_gui_cpp-0.3.11-0/src/qt_gui_cpp_shiboken/global.h:37:10: fatal error: 'pyside2_global.h' file not found
(typesystem) Errors in /tmp/global_XHYeMq.hpp:
/home/jendrik/.cache/aursync/ros-melodic-qt-gui-cpp/src/qt_gui_core-release-release-melodic-qt_gui_cpp-0.3.11-0/src/qt_gui_cpp_shiboken/global.h:37:10: fatal: 'pyside2_global.h' file not found
   /tmp/global_XHYeMq.hpp:1:10: note: in file included from /tmp/global_XHYeMq.hpp:1:


(typesystem) Clang: 1 diagnostic messages:
  /home/jendrik/.cache/aursync/ros-melodic-qt-gui-cpp/src/qt_gui_core-release-release-melodic-qt_gui_cpp-0.3.11-0/src/qt_gui_cpp_shiboken/global.h:37:10: fatal: 'pyside2_global.h' file not found
   /tmp/global_XHYeMq.hpp:1:10: note: in file included from /tmp/global_XHYeMq.hpp:1:


Keeping temporary file: /tmp/global_XHYeMq.hpp
shiboken: Error running ApiExtractor.
Command line: --generatorSet=shiboken --include-paths=/home/jendrik/.cache/aursync/ros-melodic-qt-gui-cpp/src/qt_gui_core-release-release-melodic-qt_gui_cpp-0.3.11-0/src/qt_gui_cpp_shiboken/../../include::/usr/include/qt/:/usr/include/qt/QtWidgets:/usr/include/qt/QtGui:/usr/include/qt/QtCore:/usr/lib/qt//mkspecs/linux-g++:/usr/include --typesystem-paths=/usr/share/PySide2/typesystems --output-directory=/home/jendrik/.cache/aursync/ros-melodic-qt-gui-cpp/src/build/src/qt_gui_cpp_shiboken global.h typesystem.xml
make[2]: *** [src/qt_gui_cpp_shiboken/CMakeFiles/qt_gui_cpp_shiboken.dir/build.make:75: src/qt_gui_cpp_shiboken/libqt_gui_cpp_shiboken/libqt_gui_cpp_shiboken_module_wrapper.cpp] Error 1
make[1]: *** [CMakeFiles/Makefile2:361: src/qt_gui_cpp_shiboken/CMakeFiles/qt_gui_cpp_shiboken.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

Any ideas? All other packages from melodic build fine.

@jonatanolofsson
Copy link

Did you solve this? I am having the same error. From what I have found so far, I can't add include paths through pikaur.. The file is located in /usr/include/PySide2

@UtkarshKunwar
Copy link

@jonatanolofsson, @jendrikw I fixed it by uninstalling pyside2 and pyside2-tools and installing sip and python-sip as suggested on the AUR page of the package by kaur on 2018-11-27.

@jwhendy
Copy link

jwhendy commented Jan 17, 2019

Grrr. I just ran into this myself and am confused. Should these packages be added to the makedepends? I had to manually install shiboken2 and python-shiboken2 as well.

@jwhendy
Copy link

jwhendy commented Feb 17, 2019

Back to unable to build. Without pyside2 and pyside2-tools, I get:

CMake Warning at /opt/ros/melodic/share/python_qt_binding/cmake/shiboken_helper.cmake:23 (find_package):
  By not providing "FindPySide2.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "PySide2", but
  CMake did not find one.

  Could not find a package configuration file provided by "PySide2" with any
  of the following names:

    PySide2Config.cmake
    pyside2-config.cmake

  Add the installation prefix of "PySide2" to CMAKE_PREFIX_PATH or set
  "PySide2_DIR" to a directory containing one of the above files.  If
  "PySide2" provides a separate development package or SDK, be sure it has
  been installed.
Call Stack (most recent call first):
  src/qt_gui_cpp_shiboken/CMakeLists.txt:41 (include)

With both installed, I get:

make[3]: warning: jobserver unavailable: using -j1.  Add '+' to parent make rule.
/usr/bin/ld: cannot find -l-lpthread
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:38: "/home/jwhendy/installed/build/ros-melodic-qt-gui-cpp/src/build/devel/lib/python3.7/site-packages/qt_gui_cpp/libqt_gui_cpp_sip".so] Error 1
make[2]: *** [src/qt_gui_cpp_sip/CMakeFiles/libqt_gui_cpp_sip.dir/build.make:61: devel/lib/python3.7/site-packages/qt_gui_cpp/libqt_gui_cpp_sip.so] Error 2
make[1]: *** [CMakeFiles/Makefile2:417: src/qt_gui_cpp_sip/CMakeFiles/libqt_gui_cpp_sip.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
qt.shiboken: (typesystem) CLANG builtins includes directory: /usr/lib/clang/7.0.1/include
(typesystem) clang_parseTranslationUnit2(0x0, cmd[12]=-isystem/usr/lib/clang/7.0.1/include -fPIC -Wno-constant-logical-operand -std=c++14 -I/home/jwhendy/installed/build/ros-melodic-qt-gui-cpp/src/qt_gui_core-release-release-melodic-qt_gui_cpp-0.3.11-0/src/qt_gui_cpp_shiboken/../../include -I/usr/include/qt/ -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I/usr/lib/qt//mkspecs/linux-g++ -I/usr/include /tmp/global_YzwHWY.hpp)
/home/jwhendy/installed/build/ros-melodic-qt-gui-cpp/src/qt_gui_core-release-release-melodic-qt_gui_cpp-0.3.11-0/src/qt_gui_cpp_shiboken/global.h:37:10: fatal error: 'pyside2_global.h' file not found
(typesystem) Errors in /tmp/global_YzwHWY.hpp:
/home/jwhendy/installed/build/ros-melodic-qt-gui-cpp/src/qt_gui_core-release-release-melodic-qt_gui_cpp-0.3.11-0/src/qt_gui_cpp_shiboken/global.h:37:10: fatal: 'pyside2_global.h' file not found

Despite:

$ locate pyside2_global.h
/usr/include/PySide2/pyside2_global.h

I already have sip and python-sip installed.

$ pacman -Q |grep sip
python-sip 4.19.14-1
python-sip-pyqt5 4.19.14-1
python2-sip 4.19.14-1
python2-sip-pyqt5 4.19.14-1
sip 4.19.14-1

@jwhendy
Copy link

jwhendy commented Feb 17, 2019

Update: I can bypass this if I edit ros-melodic-qt-gui-cpp/src/qt_gui_core-release-release-melodic-qt_gui_cpp-0.3.11-0/src/qt_gui_cpp_shiboken/global.h to include the directory:

#include PySide2/pyside2_global.h

My build then fails with not finding pluginlib/class_loader.hpp even though:

$ sudo updatedb
$ locate pluginlib
/opt/ros/melodic/include/pluginlib/class_loader.hpp

@dirk-thomas
Copy link
Contributor

dirk-thomas commented Feb 19, 2019

@jwhendy You don't need shiboken2 / pyside2 to build this package and should use sip / pyqt on Melodic instead. What you posted above is only a warning (CMake Warning ...) and not an error.

The fact that you are not finding any required headers indicates that you haven't sourced the setup file under /opt/ros/melodic before trying to build the workspace.

@m01
Copy link

m01 commented Sep 8, 2019

@jwhendy, I'm getting similar errors on Arch Linux while trying to build ROS2:

qt.shiboken: (typesystem) CLANG builtins includes directory: /usr/lib/clang/8.0.1/include
(typesystem) clang_parseTranslationUnit2(0x0, cmd[12]=-isystem/usr/lib/clang/8.0.1/include -fPIC -Wno-constant-logical-operand -std=c++14 -I/scratch/ros2_master_ws/src/ros-visualization/qt_gui_core/qt_gui_cpp/include -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I/usr/lib/qt/mkspecs/linux-g++ -I/usr/include /tmp/global_ycwkzj.hpp)
/scratch/ros2_master_ws/src/ros-visualization/qt_gui_core/qt_gui_cpp/include/qt_gui_cpp/ros_pluginlib_plugin_provider.h:46:10: fatal error: 'pluginlib/class_loader.hpp' file not found

Looking at the last build's events.log, I see the messages:

...
libshiboken built for Release
Shiboken2 not found
PySide2 not found
...

Both Shiboken2 and PySide2 are installed, but it seems that the variables that are being checked have perhaps changed - similar to ros-visualization/python_qt_binding#69.

When I run

grep PYSIDE_ -r /usr/lib/cmake/PySide2*

.. I don't find anything similar to PYSIDE_LIBRARY etc. Instead, I find code like this in /usr/lib/cmake/PySide2-5.13.0/PySide2Targets.cmake:

set_target_properties(PySide2::pyside2 PROPERTIES
  INTERFACE_COMPILE_DEFINITIONS "PYSIDE_QML_SUPPORT=1"
  INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include/PySide2"
)

So I guess we need to find some incantation similar to the change from ${SHIBOKEN_BINARY} to Shiboken2::shiboken2 for PySide. I think without this, given that PYSIDE_* variables are required further below, it's probably not going to compile and run correctly.

@dirk-thomas, it's not clear to me how to switch from shiboken2/pyside2 to sip/pyqt?

(I was meant to look more into the CMake stuff to see if I can find the answer, but accidentally hit the Comment button too early)

@m01
Copy link

m01 commented Sep 8, 2019

Something like this appears to fix the PySide global header import issue when building ROS2 on Arch Linux (I wouldn't treat this as "finished"):
EDIT: read but don't use these diffs, scroll down to the next comment instead

diff --git a/cmake/shiboken_helper.cmake b/cmake/shiboken_helper.cmake
index fc4be9b..f486bc1 100644
--- a/cmake/shiboken_helper.cmake
+++ b/cmake/shiboken_helper.cmake
@@ -23,8 +23,9 @@ else()
 endif()
 set(PYTHON_BASENAME "${PYTHON_SUFFIX}-${CMAKE_CXX_LIBRARY_ARCHITECTURE}")
 find_package(PySide2 QUIET)
-if(PYSIDE_LIBRARY)
-  message(STATUS "Using PYSIDE_LIBRARY: ${PYSIDE_LIBRARY}")
+if(TARGET PySide2::pyside2)
+  get_target_property(PYSIDE_INCLUDE_DIR PySide2::pyside2 INTERFACE_INCLUDE_DIRECTORIES)
+  message(STATUS "Using PYSIDE_INCLUDE_DIR: ${PYSIDE_INCLUDE_DIR}")
 else()
   message(STATUS "PySide2 not found")
 endif()
@@ -46,7 +47,7 @@ macro(_shiboken_generator_command VAR GLOBAL TYPESYSTEM INCLUDE_PATH BUILD_DIR)
     foreach(dir ${QT_INCLUDE_DIR})
         set(QT_INCLUDE_DIR_WITH_COLONS "${QT_INCLUDE_DIR_WITH_COLONS}:${dir}")
     endforeach()
-    set(${VAR} ${SHIBOKEN_BINARY} --generatorSet=shiboken --include-paths=${INCLUDE_PATH}${QT_INCLUDE_DIR_WITH_COLONS} --typesystem-paths=${PYSIDE_TYPESYSTEMS} --output-directory=${BUILD_DIR} ${GLOBAL} ${TYPESYSTEM})
+    set(${VAR} Shiboken2::shiboken2 --generatorSet=shiboken --include-paths=${INCLUDE_PATH}${QT_INCLUDE_DIR_WITH_COLONS}:${PYSIDE_INCLUDE_DIR} --typesystem-paths=${PYSIDE_TYPESYSTEMS} --output-directory=${BUILD_DIR} ${GLOBAL} ${TYPESYSTEM})
 endmacro()


@@ -120,7 +121,7 @@ function(shiboken_target_link_libraries PROJECT_NAME QT_COMPONENTS)
     set(shiboken_LINK_LIBRARIES
         ${SHIBOKEN_PYTHON_LIBRARIES}
         ${SHIBOKEN_LIBRARY}
-        ${PYSIDE_LIBRARY}
+       PySide2::pyside2
     )

     foreach(component ${QT_COMPONENTS})

References:

Now it fails for me with:

--- stderr: qt_gui_cpp
qt.shiboken: (typesystem) CLANG builtins includes directory: /usr/lib/clang/8.0.1/include
(typesystem) clang_parseTranslationUnit2(0x0, cmd[13]=-isystem/usr/lib/clang/8.0.1/include -fPIC -Wno-constant-logical-operand -std=c++14 -I/scratch/ros2_master_ws/src/ros-visualization/qt_gui_core/qt_gui_cpp/include -I/usr/include/qt -I/usr/include/qt/QtWidgets -I/usr/include/qt/QtGui -I/usr/include/qt/QtCore -I/usr/lib/qt/mkspecs/linux-g++ -I/usr/include -I/usr/include/PySide2 /tmp/global_BoSySJ.hpp)
/scratch/ros2_master_ws/src/ros-visualization/qt_gui_core/qt_gui_cpp/include/qt_gui_cpp/ros_pluginlib_plugin_provider.h:46:10: fatal error: 'pluginlib/class_loader.hpp' file not found
(typesystem) Errors in /tmp/global_BoSySJ.hpp:
/scratch/ros2_master_ws/src/ros-visualization/qt_gui_core/qt_gui_cpp/include/qt_gui_cpp/ros_pluginlib_plugin_provider.h:46:10: fatal: 'pluginlib/class_loader.hpp' file not found

@m01
Copy link

m01 commented Sep 8, 2019

Notes on my setup

As stated in my previous comment, I'm trying to build ROS2 on Arch Linux, and ran into the problem described in this ticket. I've not tried to install/uninstall/reinstall any of the sip/pyqt/shiboken[2]/pyside[2] to work around the issues.

Issues

pyside2_global.h file not found

See my comments above for details. This appears to happen because the way how PySide2 expects to be used from CMake appears to have changed. The fix/workaround for this is included in the diffs below.

Fixing this leads to...

pluginlib header cannot be found

Regarding the issue around pluginlib's headers not being found, I think this is what's happening:

  • in qt_gui_cpp/CMakeLists.txt, there's find_package(pluginlib REQUIRED) and include_directories(include ${TinyXML2_INCLUDE_DIRS} ${pluginlib_INCLUDE_DIRS}. This ensures that normally the pluginlib include directories would be added when running the compiler.
  • In this case, Shiboken is invoking the compiler, but I can't find any code that would pass the standard CMake include_directories(...)-supplied include directories to shiboken. Indeed you can see this, because the shiboken error log includes the command line args: Command line: --generatorSet=shiboken --include-paths=.... I appreciate I'm on Arch Linux, which isn't officially supported, but I don't currently understand how this normally works for people? Have there been more behaviour changes in other libraries/components/tools?
    • I can fix this by manually adding the include directories that would be added to cxx invocations to the shiboken command execution.

Fixing this leads to...

PySide::Signal namespace not found

After fixing the above there's a new error, which relates to the PySide::Signal namespace:

/scratch/ros2_master_ws/build/qt_gui_cpp/src/qt_gui_cpp_shiboken/libqt_gui_cpp_shiboken/qt_gui_cpp_plugin_wrapper.cpp: In function ‘void init_qt_gui_cpp_Plugin(PyObject*)’:
/scratch/ros2_master_ws/build/qt_gui_cpp/src/qt_gui_cpp_shiboken/libqt_gui_cpp_shiboken/qt_gui_cpp_plugin_wrapper.cpp:883:13: error: ‘PySide::Signal’ has not been declared
  883 |     PySide::Signal::registerSignals(Sbk_qt_gui_cpp_Plugin_TypeF(), &::qt_gui_cpp::Plugin::staticMetaObject);
      |             ^~~~~~
make[2]: *** [src/qt_gui_cpp_shiboken/CMakeFiles/qt_gui_cpp_shiboken.dir/build.make:155: src/qt_gui_cpp_shiboken/CMakeFiles/qt_gui_cpp_shiboken.dir/libqt_gui_cpp_shiboken/qt_gui_cpp_plugin_wrapper.cpp.o] Error 1

This seems to relate to a missing #include for pysidesignal.h, and this seems to be fixed by adding the following argument to the shiboken2 command execution:

       --enable-pyside-extensions
              Enable PySide extensions, such as support for signal/slots, use this if you are creating a binding for
              a Qt-based library.

Fixes/workarounds

Here are the diffs that fixed/worked around the issues starting with the rabbit hole mentioned in this ticket, at least for me. I hope they're useful to someone and/or help the understanding of the issue that was raised, but here are my caveats.. 🙂 :

  • I can't say I'm an expert in CMake, so perhaps there are better ways of achieving of going about this (if so, I'd love to learn).
  • I suspect these are seen in Arch Linux because it uses newer versions of shiboken2 and pyside2, but I've not checked.
    • I'm not sure if these are compatible with the supported version of Ubuntu, I've not checked. It's probably possible to come up with diffs that support old and new versions, but I'm not sure if that complexity is desirable.
  1. For ros-visualization/qt_gui_core (this repo):
% git diff
diff --git a/qt_gui_cpp/src/qt_gui_cpp_shiboken/CMakeLists.txt b/qt_gui_cpp/src/qt_gui_cpp_shiboken/CMakeLists.txt
index aaa8a80..3ac9308 100644
--- a/qt_gui_cpp/src/qt_gui_cpp_shiboken/CMakeLists.txt
+++ b/qt_gui_cpp/src/qt_gui_cpp_shiboken/CMakeLists.txt
@@ -49,7 +49,9 @@ if(shiboken_helper_FOUND)
     set(qt_gui_cpp_BINDINGS "${qt_gui_cpp_BINDINGS}" PARENT_SCOPE)

     set(QT_INCLUDE_DIR "${Qt5Widgets_INCLUDE_DIRS}")
-    shiboken_generator(libqt_gui_cpp global.h typesystem.xml ${PROJECT_SOURCE_DIR}/src/qt_gui_cpp_shiboken "${qt_gui_cpp_shiboken_SRCS}" "${qt_gui_cpp_HDRS}" "${qt_gui_cpp_INCLUDE_PATH}" "${CMAKE_CURRENT_BINARY_DIR}")
+    get_property(usual_cmake_INCLUDE_DIRECTORIES_list DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY INCLUDE_DIRECTORIES)
+    list(JOIN usual_cmake_INCLUDE_DIRECTORIES_list ":" usual_cmake_INCLUDE_DIRECTORIES)
+    shiboken_generator(libqt_gui_cpp global.h typesystem.xml ${PROJECT_SOURCE_DIR}/src/qt_gui_cpp_shiboken "${qt_gui_cpp_shiboken_SRCS}" "${qt_gui_cpp_HDRS}" "${usual_cmake_INCLUDE_DIRECTORIES}:${qt_gui_cpp_INCLUDE_PATH}" "${CMAKE_CURRENT_BINARY_DIR}")

     include_directories(qt_gui_cpp_shiboken ${qt_gui_cpp_INCLUDE_PATH}/qt_gui_cpp)
     shiboken_include_directories(qt_gui_cpp_shiboken "${qt_gui_cpp_shiboken_QT_COMPONENTS}")
  1. and forros-visualization/python_qt_binding:
diff --git a/cmake/shiboken_helper.cmake b/cmake/shiboken_helper.cmake
index fc4be9b..fff2924 100644
--- a/cmake/shiboken_helper.cmake
+++ b/cmake/shiboken_helper.cmake
@@ -16,15 +16,17 @@ else()
 endif()
 set(PYTHON_EXTENSION_SUFFIX "${PYTHON_SUFFIX}-${CMAKE_CXX_LIBRARY_ARCHITECTURE}")
 find_package(Shiboken2 QUIET)
-if(SHIBOKEN_LIBRARY)
+if(TARGET Shiboken2::libshiboken)
+  get_target_property(SHIBOKEN_INCLUDE_DIR Shiboken2::libshiboken INTERFACE_INCLUDE_DIRECTORIES)
   message(STATUS "Using SHIBOKEN_LIBRARY: ${SHIBOKEN_LIBRARY}")
 else()
   message(STATUS "Shiboken2 not found")
 endif()
 set(PYTHON_BASENAME "${PYTHON_SUFFIX}-${CMAKE_CXX_LIBRARY_ARCHITECTURE}")
 find_package(PySide2 QUIET)
-if(PYSIDE_LIBRARY)
-  message(STATUS "Using PYSIDE_LIBRARY: ${PYSIDE_LIBRARY}")
+if(TARGET PySide2::pyside2)
+  get_target_property(PYSIDE_INCLUDE_DIR PySide2::pyside2 INTERFACE_INCLUDE_DIRECTORIES)
+  message(STATUS "Using PYSIDE_INCLUDE_DIR: ${PYSIDE_INCLUDE_DIR}")
 else()
   message(STATUS "PySide2 not found")
 endif()
@@ -46,7 +48,7 @@ macro(_shiboken_generator_command VAR GLOBAL TYPESYSTEM INCLUDE_PATH BUILD_DIR)
     foreach(dir ${QT_INCLUDE_DIR})
         set(QT_INCLUDE_DIR_WITH_COLONS "${QT_INCLUDE_DIR_WITH_COLONS}:${dir}")
     endforeach()
-    set(${VAR} ${SHIBOKEN_BINARY} --generatorSet=shiboken --include-paths=${INCLUDE_PATH}${QT_INCLUDE_DIR_WITH_COLONS} --typesystem-paths=${PYSIDE_TYPESYSTEMS} --output-directory=${BUILD_DIR} ${GLOBAL} ${TYPESYSTEM})
+    set(${VAR} Shiboken2::shiboken2 --generatorSet=shiboken --include-paths=${INCLUDE_PATH}${QT_INCLUDE_DIR_WITH_COLONS}:${PYSIDE_INCLUDE_DIR} --typesystem-paths=${PYSIDE_TYPESYSTEMS} --output-directory=${BUILD_DIR} --enable-pyside-extensions ${GLOBAL} ${TYPESYSTEM})
 endmacro()


@@ -119,8 +121,8 @@ endfunction()
 function(shiboken_target_link_libraries PROJECT_NAME QT_COMPONENTS)
     set(shiboken_LINK_LIBRARIES
         ${SHIBOKEN_PYTHON_LIBRARIES}
-        ${SHIBOKEN_LIBRARY}
-        ${PYSIDE_LIBRARY}
+        Shiboken2::libshiboken
+       PySide2::pyside2
     )

     foreach(component ${QT_COMPONENTS})

@dirk-thomas
Copy link
Contributor

This will be addressed by #201 and the latest python_qt_binding release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants