Closed Rauldg closed 5 years ago
I think the rock_find_qt can be removed completely. No need for an extra flag. envire_core should not depend on qt
I have removed the rock_find_qt4()
call completely. It builds just fine. I think at some point during development the core used qt and this is a relict of that time. Thanks for pointing it out!
Here is some Qt dependent stuff.
Seems like those do not get build by default because without Qt installed the whole project still compiles.
Ahh damn I forgot about the visualizations... We could move the visualizations to envire_visualizer? I think that was already discussed in #32. What do you think?
I like the idea too.
Would it break backward-compatibility?
Hmm, it would break backward-compatibility for components that include the visualizers directly instead of loading them through vizkit3d. I think that the envire_visualizer is the only one doing that at the moment and we can fix that :) I'll give it a try
The viz subfolder should be optional already. It is only build if the vizkit3d library is available. Additionally it can be excluded by setting ROCK_VIZ_ENABLED
to OFF
.
Hmm ok, in that case I'll just leave it where it is :)
@saarnold
Even with the ROCK_VIZ_ENABLED set to OFF, cmake still depends on Qt to build successfully:
I added this line
message("ROCK VIZ ENABLED " ${ROCK_VIZ_ENABLED})
before the rock_find_qt4()
line to make sure the variable was set and got this output:
-- Plugin system enabled
ROCK VIZ ENABLED OFF
qmake: could not exec '/usr/lib/x86_64-linux-gnu/qt4/bin/qmake': No such file or directory
CMake Error at /usr/share/cmake-3.5/Modules/FindQt4.cmake:1326 (message):
Found unsuitable Qt version "" from NOTFOUND, this code requires Qt 4.x
Call Stack (most recent call first):
/home/appuser/infuse/cdff/CDFF/External/install/share/rock/cmake/Rock.cmake:318 (find_package)
CMakeLists.txt:41 (rock_find_qt4)
rock_find_qt4()
does not check for vizkit existence and also does not honor the ROCK_VIZ_ENABLED flag. It simply checks if qt exists. I think rock_find_qt4()
should be removed from the main CMakeLists.txt (I have already removed it).
If needed we could add it to viz/CMakeLists.txt.
Alternatively we could use rock_find_qt4(OPTIONAL)
There shouldn't be a rock_find_qt4()
in the root CMakeLists.txt.
Arne fixed this in this commit: https://github.com/envire/envire-envire_core/commit/759a8a50816176c4b31f09ba0f8f6f2f31d394ae
Please check if you are on the current master branch.
Qt4 will be linked by the rock macros when the visualizations are included.
Allows the user to build Envire without qt4