D17547: Bring FindFontconfig.cmake up to ECM standards

Christophe Giboudeaux <[email protected]>
Newsgroups gmane.comp.kde.devel.buildsystem,gmane.comp.kde.devel.kwin
Message-ID <[email protected]>
cgiboudeaux added inline comments.

INLINE COMMENTS

> FindFontconfig.cmake:58
> +set(Fontconfig_DEFINITIONS ${PC_FONTCONFIG_CFLAGS_OTHER})
> +set(Fontconfig_VERSION ${PC_FONTCONFIG_VERSION})
>  

You need a fallback method for platforms where pkgconfig isn't usable.

fontconfig.h defines FC_MAJOR, FC_MINOR, FC_REVISION

> FindFontconfig.cmake:72
> +include(FindPackageHandleStandardArgs)
> +find_package_handle_standard_args(Fontconfig DEFAULT_MSG Fontconfig_LIBRARIES Fontconfig_INCLUDE_DIRS)
>  

Now that you have Fontconfig_VERSION, please use the second form:

  find_package_handle_standard_args(Fontconfig
  FOUND_VAR Fontconfig_FOUND
  REQUIRED_VARS Fontconfig_LIBRARIES Fontconfig_INCLUDE_DIRS
  VERSION_VAR Fontconfig_VERSION)

REPOSITORY
  R108 KWin

REVISION DETAIL
  https://phabricator.kde.org/D17547

To: vkrause, #build_system
Cc: cgiboudeaux, kwin, GB_2, mkulinski, ragreen, jackyalcine, Pitel, iodelay, bwowk, ZrenBot, lesliezhai, ali-mohamed, hardening, jensreuterberg, abetts, sebas, apol, mart
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.