Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Language Bindings
  4. Where are FindShiboken and FindPySide.cmake? for PySide Binding Generation Tutorial
Forum Updated to NodeBB v4.3 + New Features

Where are FindShiboken and FindPySide.cmake? for PySide Binding Generation Tutorial

Scheduled Pinned Locked Moved Language Bindings
3 Posts 1 Posters 3.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • R Offline
    R Offline
    redcave
    wrote on last edited by
    #1

    Hi all,

    I am trying to do the tutorial
    "PySide_Binding_Generation_Tutorial":http://qt-project.org/wiki/PySide_Binding_Generation_Tutorial
    on Win7 64-bit.

    I have the Qt 4.8.0 sdk and cmake 2.8 installed.

    The result of the command

    C:\foo\foobinding-cmake\build> cmake ..

    is that it fails because ShibokenConfig.cmake is not found.
    I think the file I need is FindShiboken.cmake, where should I look for that?

    Also same question for PySideConfig.cmake/FindPySide.cmake .

    Googling this, I sometimes see comment about this being a known bug.
    Not sure if that means there is no workaround, or that the workaround is somehow obvious.

    I have access to linux systems and have also searched those disks for FindShiboken and FindPySide; no luck.

    On Windows, there is a large number of cmake files under the cmake installation e.g.
    C:\CMake28\share\cmake-2.8\Modules\Find*.cmake
    but not the ones that I need.

    Thanks for any insight.

    Owen

    1 Reply Last reply
    0
    • R Offline
      R Offline
      redcave
      wrote on last edited by
      #2

      Hello all,

      The problem has morphed into this library mismatch issue:
      @C:\binding-tutorial\foobinding-cmake\build>c:\CMake28\bin\cmake.exe ..
      CMake Error at c:/CMake28/share/cmake-2.8/Modules/FindQt4.cmake:575 (MESSAGE):
      It appears you re trying to use Visual Studio with Qt built by mingw.
      Those compilers do not produce code compatible with each other.
      Call Stack (most recent call first):
      CMakeLists.txt:5 (find_package)@

      I have VC2008 compiler installed, and Qt SDK 4.8.1 with both MSVC and mingw libraries installed.
      From Win7, I can launch a terminal Start>Qt SDK>Desktop>Qt 4.8.1 for Desktop (MSVC 2008) that has environment variable
      @QTDIR=C:\QtSDK\Desktop\Qt\4.8.1\msvc2008@

      and QTDIR has all the needed libs plus a subfolder bin with bin\qmake.exe.

      Running cmake in that terminal, the problem seems to be that FindQt4.cmake is not "finding" the Qt libs that I want to link against.

      Question: Any thoughts on how I can force cmake in the right direction here?

      FWIW, I solved the problem of the missing Windows cmake files by searching on linux for the missing files
      @
      user@ubuntu:~$ apt-file search ShibokenConfig.cmake
      libshiboken-dev: /usr/lib/i386-linux-gnu/cmake/Shiboken-1.1.0/ShibokenConfig.cmake
      user@ubuntu:~$ apt-file search PySideConfig.cmake
      libpyside-dev: /usr/lib/i386-linux-gnu/cmake/PySide-1.1.0/PySideConfig.cmake
      @

      and used the files in those packages as models to build the corresponding .cmake files for Windows.

      1 Reply Last reply
      0
      • R Offline
        R Offline
        redcave
        wrote on last edited by
        #3

        Hello all,
        The problem has morphed again.

        Question: Where should I look for generatorrunner on Win7? Should a pointer to it come back from PySideConfig.cmake?

        Details:

        From the Qt SDK I had both 4.8.0 and 4.8.1 libs installed and this was causing an issue, so I now have just the 4.8.0 MSVC 2008 environment.
        Now the error relates to

        @CMake Error at CMakeLists.txt:14 (message):
        You need to specify GENERATOR variable (-DGENERATOR=value)@

        It seems that generatorrunner is a command that you can run in a linux terminal, but I have no path to it on Win7. I think it should be part of pyside distribution, but I have found no files named generatorrunner on my whole Win7 drive.

        The message arises here in the CMakeLists.txt provided with the tutorial.
        @
        find_program(GENERATOR generatorrunner REQUIRED)
        if (NOT GENERATOR)
        message(FATAL_ERROR "You need to specify GENERATOR variable (-DGENERATOR=value)")
        endif()
        @

        apt-file search generatorrunner on linux gives
        shiboken: /usr/lib/i386-linux-gnu/generatorrunner/shiboken.so

        My Win7 build strategy for the binding tutorial is to launch a bare console then run:
        @
        CALL "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\vcvarsall.bat" x86
        set QTDIR=C:\QtSDK\Desktop\Qt\4.8.0\msvc2008
        set PATH=%QTDIR%\bin;C:\QtSDK\QtCreator\bin;%PATH%
        set QMAKESPEC=win32-msvc2008
        set BINDFOO=C:\binding-tutorial\

        set Shiboken_DIR=.
        set PySide_DIR=.

        cd %BINDFOO%\libfoo
        qmake
        nmake

        cd %BINDFOO%\foobinding-cmake\build
        C:\CMake28\bin\cmake.exe ..
        @

        Thanks for any suggestions.

        Owen

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved