One fix to the note about QtGui: * QtGui: Unknown linker option: --reduce-memory-overheads PySide/QtGui/CMakeLists.txt Comment out the "LINK_FLAGS" line: #set_target_properties(QtGui PROPERTIES PREFIX "" LINK_FLAGS "-Wl,--reduce-memory- > > overheads") >
Add back the property to strip the library prefix: set_property(TARGET QtGui PROPERTY PREFIX "") and ignore my other note about changing the install library name from QtGui.so to libQtGui.so.... On Wed, Sep 9, 2009 at 4:21 PM, Brendan Duncan <[email protected]>wrote: > I finally got PySide built for the Mac. It was an effort. When I get a > chance, I'll put together a more coherent set of notes. But for now, here > are the changes I needed to make to get it built. > > * Because the generator was picking up the wrong atomic_*.h system-specific > headers, I had to remove the ones I didn't want picked up from the Qt > includes directory. Maybe these should just be ignored by the generator > alltogether, or figure out how to get the generator to pick up the header > for the correct architecture.... > > * QtCore will build fine, but QtGui complains about not being able to find > the Qt headers for some reason. I had to add > set(QT_INCLUDE_DIR "/usr/local/Trolltech/Qt-4.5.2/include") > to the top level CMakeLists.txt for it to build. I can re-look into this, > because PySide should build using only what's available from the binary > install of Qt on OSX (which means CMake should find things in the > /Library/Frameworks directories). > > * QtUiTools doesn't get installed as a Framework on OSX, so I had to add: > set(QT_QTUITOOLS_INCLUDE_DIR > "/usr/local/Trolltech/Qt-4.5.2/include/QtUiTools") > in order for CMake to find those headers. Like the previous issue, a > better solution should be found that rely only on the binary install of Qt. > > * There are some unsupported linker flags being used in > CMAKE_CXX_FLAGS_RELEASE in the top level CMakeLists.txt, so I had to take > those out by removing the -Wl,* flags: > set(CMAKE_CXX_FLAGS_RELEASE "-Wall -fvisibility=hidden > -fvisibility-inlines-hidden -Os -finline-limit=600 -ffunction-sections > -fomit-frame-pointer -fno-default-inline -fconserve-space > -fno-enforce-eh-specs -fno-threadsafe-statics -fno-implicit-inline-templates > -DNDEBUG -DBOOST_PYTHON_NO_PY_SIGNATURES") > > * boost::python is having trouble with some class methods that return > Qt::Handle, because it's an alias for void*, and there is no return policy > defined for void*. For now, I just had the scanner ignore those methods by > adding the following. > > data/typesystem/typesystem_core.xml: > <rejection class="QThread" function-name="currentThreadId"/> > > data/typesystem/typesystem_gui.xml: > <rejection class="QFont" function-name="handle"/> > > data/typesystem/typesystem_network.xml: > <rejection class="QSslCertificate" function-name="handle"/> > <rejection class="QSslKey" function-name="handle"/> > > data/typesystem/typesystem_opengl.xml > <rejection class="QGLColormap" function-name="handle"/> > <rejection class="QGLPixelBuffer" function-name="handle"/> > > > * QtGui: qx11_info is not available on OSX or windows: > PySide/QtGui/CMakeLists.txt > Comment out the qx11_wrapper lines: > #${CMAKE_CURRENT_BINARY_DIR}/${BINDING_NAME}/QtGui/qx11info_wrapper.cpp > #${CMAKE_CURRENT_BINARY_DIR}/${BINDING_NAME}/QtGui/qx11info_wrapper.hpp > > > * QtGui: Unknown linker option: --reduce-memory-overheads > PySide/QtGui/CMakeLists.txt > Comment out the "LINK_FLAGS" line: > #set_target_properties(QtGui PROPERTIES PREFIX "" LINK_FLAGS > "-Wl,--reduce-memory-overheads") > > > * QtOpenGL: Missing link to QtGui library (causes undefined QWidget > symbols). > PySide/QtOpenGL/CMakeLists.txt > Add ${QT_QTGUI_LIBRARY} to target_link_libraries. > target_link_libraries(QtOpenGL > ${Boost_PYTHON_LIBRARY} > ${PYTHON_LIBRARIES} > ${QT_QTCORE_LIBRARY} > ${QT_QTGUI_LIBRARY} > ${QT_QTOPENGL_LIBRARY} > pysidebase) > > > * QtHelp: Missing link to QtGUi library. > PySide/QtHelp/CMakeLists.txt > Add ${QT_QTGUI_LIBRARY} to target_link_libraries. > target_link_libraries(QtHelp > ${Boost_PYTHON_LIBRARY} > ${PYTHON_LIBRARIES} > ${QT_QTCORE_LIBRARY} > ${QT_QTGUI_LIBRARY} > ${QT_QTHELP_LIBRARY} > pysidebase) > > > * QtScriptTools: The "ugly workaround" in QtScriptTools CMakeLists.txt does > not work for OSX. > PySide/QtScriptTools/CMakeLists.txt > Replace > set (QT_QTSCRIPTTOOLS_INCLUDE_DIR ${QT_QTSCRIPT_INCLUDE_DIR}Tools) > set (QT_QTSCRIPTTOOLS_LIBRARY -lQtScriptTools) > With > set(QT_QTSCRIPTTOOLS_INCLUDE_DIR > "/Library/Frameworks/QtScriptTools.framework/Headers") > set (QT_QTSCRIPTTOOLS_LIBRARY "-framework QtScriptTools") > > > * QtScriptTools: Missing link to QtGui and QtScript libraries. > PySide/QtScriptTools/CMakeLists.txt > Add ${QT_QTGUI_LIBRARY} and ${QT_QTSCRIPT_LIBRARY} to > target_link_libraries. > target_link_libraries(QtScriptTools > ${Boost_PYTHON_LIBRARY} > ${PYTHON_LIBRARIES} > ${QT_QTCORE_LIBRARY} > ${QT_QTGUI_LIBRARY} > ${QT_QTSCRIPT_LIBRARY} > ${QT_QTSCRIPTTOOLS_LIBRARY} > pysidebase) > > > > * QtUiTools: Missing link to QtUiTools library. > OSX doesn't install QtUiTools as a Framework (because QtUiTools is a static > library and not a shared library). This also means that (as far as I know) > Qt does not include the QtUiTools library with the binary installation of Qt > on OSX! > > QtUiTools needs to be manually added to the libraries to link: > PySide/QtUiTools/CMakeLists.txt > Add the QtUiTools library. > set (QT_QTUITOOLS_LIBRARY "-L/usr/local/Trolltech/Qt-4.5.2/lib > -lQtUiTools") > > > * QtGui creates libQtGui.so, but the install is trying to copy QtGui.so. > PySide/QtGui/CMakeLists.txt > Change > install(FILES ${CMAKE_CURRENT_BINARY_DIR}/QtGui.so > To > install(FILES ${CMAKE_CURRENT_BINARY_DIR}/libQtGui.so > > >
_______________________________________________ PySide mailing list [email protected] http://lists.openbossa.org/listinfo/pyside
