Closed florent-lamiraux closed 4 years ago
I do not understand either why
${PROJECT_QT_LIBS} ${PYTHONQT_LIBRARIES})
is not inside the test
IF(GEPETTO_GUI_HAS_PYTHONQT)
There is only a weak reason: They should be empty when GEPETTO_GUI_HAS_PYTHONQT is FALSE and putting it here makes the code shorter.
For the rest, I have no idea. Maybe it's time to drop Qt4 support...
I will try to install with Qt5 and update the installation instructions accordingly.
I've been looking at this, and I found that adding TARGET_LINK_LIBRARY(${LIBRARY_NAME} ${PYTHON_LIBRARIES})
after the TARGET_LINK_BOOST_PYTHON(${LIBRARY_NAME})
fixed the issue.
However, I wanted to dig further to try to understand why we didn't had this issue before. Does this mean that every time we link to boost::python we also have to manually link to python ? And in all our other packages, we always linked to python every time we linked to boost::python just by chance ?
If so, shouldn't we just update the TARGET_LINK_BOOST_PYTHON
macro to also link to python ?
Anyway, we can also just stop wondering, apply the fix, and go ahead.
For Qt4, I'm affraid it won't be possible to drop its support, while ubuntu is not providing osgqt with qt5.
Or if you are only talking about the HPP makefile, why not, but this mean that everybody will have to build openscenegraph, which is really boring.
I've been looking at this, and I found that adding
TARGET_LINK_LIBRARY(${LIBRARY_NAME} ${PYTHON_LIBRARIES})
after theTARGET_LINK_BOOST_PYTHON(${LIBRARY_NAME})
fixed the issue.
CMake should handle this automatically. I checked and the call to target_link_libraries should contain the PUBLIC keyword.
For Qt4, I'm affraid it won't be possible to drop its support, while ubuntu is not providing osgqt with qt5.
Or if you are only talking about the HPP makefile, why not, but this mean that everybody will have to build openscenegraph, which is really boring.
Can't robotpkg also provide the Qt5 plugin where missing ? The instructions to build that plugin are fairly easy. Something like:
apt source libopenscenegraph
untar and cd to source
mkdir build && cd build
cmake .. -DDESIRED_QT_VERSION=5 ..
cd osgQt
make install
This should only install the osgQt.so file, compatible with the repository version. The same applies to osg-dae, which should use the above procedure rather than the source repo I created long ago.
Is it possible to make a release 4.9.1 with the fix ? (a tag is enough).
Which target_link_libraries
?
I don't think that is is easy to get sources from apt source
in robotpkg. Let's ask Anthony: https://git.openrobots.org/issues/255
@florent-lamiraux : yes, I can easily make a 4.9.1 release.
Anyway, I think that with @jmirabel snippet, we can drop support for Qt4 at least in the HPP Makefile, can't we ?
Anyway, I think that with @jmirabel snippet, we can drop support for Qt4 at least in the HPP Makefile, can't we ?
could be. At the cost of having a more complex makefile.
Fixed by https://github.com/Gepetto/PythonQt/pull/6, thanks @florent-lamiraux !
I try to recompile HPP with the latest releases to update the installation instruction. When linking
gepetto-gui
I have many undefined symbols and I notice that the link command does not contain-lpython
. Looking at the CMakeLists below, https://github.com/Gepetto/gepetto-viewer/blob/f7b4a4497bf8276713a94ef0b768cc06111a97b2/src/CMakeLists.txt#L147 I would expect something likeI do not understand either why
is not inside the test
The linking command line: