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

Allow setting custom FREETYPE_LIBRARY/FREETYPE_INCLUDE_DIRS through CMake #5730

Merged
merged 1 commit into from
Nov 7, 2022

Conversation

ptosco
Copy link
Contributor

@ptosco ptosco commented Nov 4, 2022

I have just upgraded to our latest internal conda environment and noticed that the conda FreeType library has an additional dependency on libXau which apparently is not correctly captured by CMake's FindFreetype. So I need to manually specify the dependency by setting

-D FREETYPE_LIBRARY="$CONDA_PREFIX/lib64/lib/libfreetype.so;/lib64/libXau.so" \
-D FREETYPE_INCLUDE_DIRS=$CONDA_PREFIX/include/freetype2 \

However, for this to work I had to replace the Freetype::Freetype IMPORTED target with the standard pair of FREETYPE_INCLUDE_DIRS/FREETYPE_LIBRARIES vars (thus consolidating the mechanism that was already used my emscripten builds).

…air of FREETYPE_INCLUDE_DIRS/FREETYPE_LIBRARIES vars (thus consolidating the mechanism that was already used my emscripten builds).

  This allows to specify them as -D flags on the CMake line giving a bit more flexibility.
Copy link
Member

@greglandrum greglandrum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@greglandrum greglandrum merged commit e84a0a2 into rdkit:master Nov 7, 2022
@greglandrum
Copy link
Member

@ptosco :what's your take on how I should tag this (bug/enhancement) and which milestone I should assign it to?
Is this a bug fix for 2022.09.2 or something for 2023.03?

@ptosco
Copy link
Contributor Author

ptosco commented Nov 8, 2022

@greglandrum I would consider it a bug fix for 2022.09.2 - the way it previously worked prevented setting an explicit path to FreeType library and headers, which can be considered a bug given that's usually possible for most if not all libraries.

@greglandrum greglandrum added this to the 2022_09_2 milestone Nov 8, 2022
@greglandrum greglandrum added bug infrastructure build infrastructure and the like labels Nov 8, 2022
greglandrum pushed a commit that referenced this pull request Nov 23, 2022
…air of FREETYPE_INCLUDE_DIRS/FREETYPE_LIBRARIES vars (thus consolidating the mechanism that was already used my emscripten builds). (#5730)

This allows to specify them as -D flags on the CMake line giving a bit more flexibility.

Co-authored-by: Tosco, Paolo <paolo.tosco@novartis.com>
@ptosco ptosco mentioned this pull request Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug infrastructure build infrastructure and the like
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants