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

FindGraphviz: Add Graphviz_DEFINITIONS to define GVDLL and release 0.14.2 #414

Merged
merged 3 commits into from
Jun 10, 2022

Conversation

traversaro
Copy link
Member

@traversaro traversaro commented Jun 10, 2022

Since graphviz 3, any downstream library that on Windows links against a graphviz shared library needs to define the GVDLL preprocessor definition (see https://gitlab.com/graphviz/graphviz/-/blob/3.0.0/CHANGELOG.md#changed).

To deal with this, this PR adds the Graphviz_DEFINITIONS output variable to the FindGraphviz module, and populates with GVDLL when on Windows (on graphviz < 3 defining this definition will be harmless). As that prepocessor definition should not be set when linking static graphviz, and given that we can't detect in FindGraphviz if the linked graphviz is static or not, an ad-hoc CMake variable YCM_FINDGRAPHVIZ_USE_STATIC_GRAPHVIZ is introduced in the case this definition needs to be disabled.

Partial fix for robotology/robotology-superbuild#1166 and robotology/robotology-superbuild#1152 .

@traversaro traversaro changed the title FindGraphviz: Add Graphviz_DEFINITIONS to define GVDLL FindGraphviz: Add Graphviz_DEFINITIONS to define GVDLL and release 0.14.2 Jun 10, 2022
@traversaro traversaro merged commit 2583228 into ycm-0.14 Jun 10, 2022
@traversaro traversaro deleted the fixgraphviz3 branch June 10, 2022 22:11
traversaro added a commit to gazebosim/gazebo-classic that referenced this pull request Jan 27, 2023
…supporting graphviz >= 3 on Windows (#3287)

The fix is composed by two unrelated changes

### [Fix conda-forge GitHub Action CI by using mambaforge directly](eea77c2)

Currently the CI is failing on Linux and Windows with a weird conflict error. This is due to the fact that we are install mamba (from the conda-forge channel) on the top of miniconda3 (that by default install all the packages from the defaults channel). To make an analogy in apt world, this is like installing Debian, and then trying to install packages from the Ubuntu repo: something can go wrong.

To solve this problem, we install [mambaforge](https://github.com/conda-forge/miniforge) (a installer like miniconda3 but already using conda-forge packages) directly, so we always and only use packages from the conda-forge channel. 

Similar to:
* robotology/robotology-superbuild#840
* robotology/robometry#141
* robotology/yarp-devices-ros2#44

### [Add support to use graphviz >= 3 on Windows](15435b1)

Since graphviz 3, any downstream library that on Windows links against a graphviz shared library needs to define the `GVDLL` preprocessor definition (see https://gitlab.com/graphviz/graphviz/-/blob/3.0.0/CHANGELOG.md#changed). 

To deal with this, this PR adds the `GVDLL` definition for `gazebo_gui` when on Windows (on graphviz < 3 defining this definition will be harmless). As that prepocessor definition should not be set when linking static graphviz, and given that we can't detect in `FindGraphviz`  if the linked graphviz is static or not, an ad-hoc CMake variable `GAZEBO_FINDGRAPHVIZ_USE_STATIC_GRAPHVIZ` is introduced in the case this definition needs to be disabled. 


Similar to robotology/ycm-cmake-modules#414 .
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

Successfully merging this pull request may close these issues.

2 participants