Open felixf4xu opened 4 months ago
I agree that we should check whether it is installed first.
However, I think we should go a bit further. What I think we should actually do is to split this out into its own package (freetype_vendor
), and then make rviz_ogre_vendor
depend on it. That makes it clearer that this is a vendored dependency, which should make it easier to remove in the future. Would you be willing to give that a shot?
I can have a try, but to be honest, I don't know why rviz_ogre needs to compile freetype from source. Maybe a specific source version? some source code patch? or compiler switches?
I also checked https://github.com/ros2/rviz/blob/rolling/rviz_ogre_vendor/FindFreetype.cmake against the cmake's default FindFreetype.cmake
, I'm not sure if I need to delete one from this repo.
I can have a try, but to be honest, I don't know why rviz_ogre needs to compile freetype from source. Maybe a specific source version? some source code patch? or compiler switches?
I'm not entirely sure, though it likely has something to do with Windows. Eventually we want to move away from vendoring these at all, and moving this to freetype_vendor
is one step closer to doing that.
I also checked https://github.com/ros2/rviz/blob/rolling/rviz_ogre_vendor/FindFreetype.cmake against the cmake's default
FindFreetype.cmake
, I'm not sure if I need to delete one from this repo.
It is certainly worth a shot; we'd rather carry around fewer of those if they are built-in to CMake itself.
https://github.com/ros2/rviz/blob/526f25105b4f679a4c09128558d94b678affd0fa/rviz_ogre_vendor/CMakeLists.txt#L16-L17
It's better to check if
Freetype
is already installed before building it from sourceMy proposed change is like this:
If it's OK then I will create a PR.