Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check if Freetype is installed before building it from source #1212

Open
felixf4xu opened this issue Jun 1, 2024 · 3 comments
Open

Check if Freetype is installed before building it from source #1212

felixf4xu opened this issue Jun 1, 2024 · 3 comments
Assignees

Comments

@felixf4xu
Copy link
Contributor

felixf4xu commented Jun 1, 2024

ament_vendor(freetype_vendor
VCS_URL https://git.savannah.gnu.org/git/freetype/freetype2.git

It's better to check if Freetype is already installed before building it from source

My proposed change is like this:

  find_package(Freetype QUIET)
  ament_vendor(freetype_vendor
    SATISFIED ${Freetype_FOUND}
    VCS_URL https://git.savannah.gnu.org/git/freetype/freetype2.git

If it's OK then I will create a PR.

@clalancette
Copy link
Contributor

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?

@felixf4xu
Copy link
Contributor Author

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.

@clalancette
Copy link
Contributor

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants