WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
205042
[CMake] Add HarfBuzz targets
https://bugs.webkit.org/show_bug.cgi?id=205042
Summary
[CMake] Add HarfBuzz targets
Don Olmstead
Reported
2019-12-09 18:15:51 PST
Add HarfBuzz:: targets within the FindHarfBuzz module.
Attachments
WIP Patch
(7.38 KB, patch)
2019-12-09 18:29 PST
,
Don Olmstead
no flags
Details
Formatted Diff
Diff
WIP Patch
(7.41 KB, patch)
2019-12-09 18:30 PST
,
Don Olmstead
no flags
Details
Formatted Diff
Diff
WIP Patch
(9.14 KB, patch)
2019-12-09 18:35 PST
,
Don Olmstead
no flags
Details
Formatted Diff
Diff
Patch
(12.00 KB, patch)
2019-12-10 13:46 PST
,
Don Olmstead
no flags
Details
Formatted Diff
Diff
Patch
(12.00 KB, patch)
2019-12-10 16:51 PST
,
Don Olmstead
no flags
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Don Olmstead
Comment 1
2019-12-09 18:29:23 PST
Comment hidden (obsolete)
Created
attachment 385221
[details]
WIP Patch Just the CMake module changes
Don Olmstead
Comment 2
2019-12-09 18:30:52 PST
Comment hidden (obsolete)
Created
attachment 385222
[details]
WIP Patch
Don Olmstead
Comment 3
2019-12-09 18:35:02 PST
Comment hidden (obsolete)
Created
attachment 385225
[details]
WIP Patch
Don Olmstead
Comment 4
2019-12-10 13:46:47 PST
Created
attachment 385303
[details]
Patch
Don Olmstead
Comment 5
2019-12-10 14:17:41 PST
Comment on
attachment 385303
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=385303&action=review
> Source/cmake/OptionsGTK.cmake:27 > +find_package(HarfBuzz 0.9.18 REQUIRED COMPONENTS ICU)
Igalia folks is this ok? Latest release is 2.6.4 and 0.9.18 is from May of 2013. WPE sets it as the minimum. If not then I have to add back in the version check to see if the ICU library is split off from the main harfbuzz library.
Konstantin Tokarev
Comment 6
2019-12-10 14:47:06 PST
Comment on
attachment 385303
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=385303&action=review
Actually, modern versions of HarfBuzz provide cmake config files with harfbuzz::harfbuzz and harfbuzz::icu target, though I didn't research in which version they were added
> Source/cmake/FindHarfBuzz.cmake:60 > +``HarfBuzz_INCLUDE_DIRS``
While code below defines HarfBuzz_INCLUDE_DIR, not DIRS. FWIW, modern cmake use "*DIRS" naming.
> Source/cmake/FindHarfBuzz.cmake:94 > + message(FATAL_ERROR "Required version (" ${Harfbuzz_FIND_VERSION} ") is higher than found version (" ${Harfbuzz_VERSION} ")")
Nice catch, but it should be spelled as HarfBuzz_VERSION
Carlos Alberto Lopez Perez
Comment 7
2019-12-10 16:25:15 PST
Comment on
attachment 385303
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=385303&action=review
>> Source/cmake/OptionsGTK.cmake:27 >> +find_package(HarfBuzz 0.9.18 REQUIRED COMPONENTS ICU) > > Igalia folks is this ok? Latest release is 2.6.4 and 0.9.18 is from May of 2013. WPE sets it as the minimum. > > If not then I have to add back in the version check to see if the ICU library is split off from the main harfbuzz library.
I think it is OK. Our policy for bumping versions of dependencies is this one:
https://trac.webkit.org/wiki/WebKitGTK/DependenciesPolicy
Ubuntu 18.04 LTS has harfbuzz 1.7.2 and Debian 10 Stable version 2.3.1 (and Debian 9 oldstable 1.4.2)
Don Olmstead
Comment 8
2019-12-10 16:49:26 PST
(In reply to Konstantin Tokarev from
comment #6
)
> Comment on
attachment 385303
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=385303&action=review
> > Actually, modern versions of HarfBuzz provide cmake config files with > harfbuzz::harfbuzz and harfbuzz::icu target, though I didn't research in > which version they were added
It seems like they want to move over to meson at some point in the future. So we'll probably have to have our own or push one to CMake's repo which would take a long time to trickle down to linux distros.
> > Source/cmake/FindHarfBuzz.cmake:60 > > +``HarfBuzz_INCLUDE_DIRS`` > > While code below defines HarfBuzz_INCLUDE_DIR, not DIRS. > > FWIW, modern cmake use "*DIRS" naming.
I was looking at the following modules which seemed to be more recently updates.
https://gitlab.kitware.com/cmake/cmake/blob/master/Modules/FindFontconfig.cmake
https://gitlab.kitware.com/cmake/cmake/blob/master/Modules/FindTIFF.cmake
They both use _LIBRARY, marking it as advanced, and then create a _LIBRARIES variable off of it. Seems like an ok pattern there.
> > Source/cmake/FindHarfBuzz.cmake:94 > > + message(FATAL_ERROR "Required version (" ${Harfbuzz_FIND_VERSION} ") is higher than found version (" ${Harfbuzz_VERSION} ")") > > Nice catch, but it should be spelled as HarfBuzz_VERSION
Good catch there!
Don Olmstead
Comment 9
2019-12-10 16:50:44 PST
(In reply to Carlos Alberto Lopez Perez from
comment #7
)
> Comment on
attachment 385303
[details]
> Patch > > View in context: >
https://bugs.webkit.org/attachment.cgi?id=385303&action=review
> > >> Source/cmake/OptionsGTK.cmake:27 > >> +find_package(HarfBuzz 0.9.18 REQUIRED COMPONENTS ICU) > > > > Igalia folks is this ok? Latest release is 2.6.4 and 0.9.18 is from May of 2013. WPE sets it as the minimum. > > > > If not then I have to add back in the version check to see if the ICU library is split off from the main harfbuzz library. > > I think it is OK. > Our policy for bumping versions of dependencies is this one: >
https://trac.webkit.org/wiki/WebKitGTK/DependenciesPolicy
> Ubuntu 18.04 LTS has harfbuzz 1.7.2 and Debian 10 Stable version 2.3.1 (and > Debian 9 oldstable 1.4.2)
Great thanks for confirming! For those of us who don't use Linux is there a good way to see what the distribution is bundling and what specific version you all are supporting?
Don Olmstead
Comment 10
2019-12-10 16:51:13 PST
Created
attachment 385316
[details]
Patch Fix review comments
Konstantin Tokarev
Comment 11
2019-12-10 17:18:35 PST
> It seems like they want to move over to meson at some point in the future. > So we'll probably have to have our own or push one to CMake's repo which > would take a long time to trickle down to linux distros. >
Inclusion of modules unto cmake itself is long since discouraged, projects are expected to install their own cmake config files as a part of make install routine
Konstantin Tokarev
Comment 12
2019-12-10 17:23:32 PST
Comment on
attachment 385316
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=385316&action=review
> Source/cmake/FindHarfBuzz.cmake:31 > +# HarfBuzz_INCLUDE_DIRS - containg the HarfBuzz headers
You still have DIRS here and DIR in code, it needs to be consistent
Carlos Alberto Lopez Perez
Comment 13
2019-12-10 17:42:49 PST
(In reply to Don Olmstead from
comment #9
)
> (In reply to Carlos Alberto Lopez Perez from
comment #7
) > > Comment on
attachment 385303
[details]
> > Patch > > > > View in context: > >
https://bugs.webkit.org/attachment.cgi?id=385303&action=review
> > > > >> Source/cmake/OptionsGTK.cmake:27 > > >> +find_package(HarfBuzz 0.9.18 REQUIRED COMPONENTS ICU) > > > > > > Igalia folks is this ok? Latest release is 2.6.4 and 0.9.18 is from May of 2013. WPE sets it as the minimum. > > > > > > If not then I have to add back in the version check to see if the ICU library is split off from the main harfbuzz library. > > > > I think it is OK. > > Our policy for bumping versions of dependencies is this one: > >
https://trac.webkit.org/wiki/WebKitGTK/DependenciesPolicy
> > Ubuntu 18.04 LTS has harfbuzz 1.7.2 and Debian 10 Stable version 2.3.1 (and > > Debian 9 oldstable 1.4.2) > > Great thanks for confirming! For those of us who don't use Linux is there a > good way to see what the distribution is bundling and what specific version > you all are supporting?
Yes, package info and versions for Debian and Ubuntu can be queried at
https://packages.debian.org
and
https://packages.ubuntu.com
respectively.
Don Olmstead
Comment 14
2019-12-10 17:45:31 PST
Comment on
attachment 385316
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=385316&action=review
> Source/cmake/FindHarfBuzz.cmake:179 > + set(HarfBuzz_INCLUDE_DIRS ${HarfBuzz_INCLUDE_DIR})
HarfBuzz_INCLUDE_DIRS is set here. See
https://gitlab.kitware.com/cmake/cmake/blob/master/Modules/FindTIFF.cmake#L75-76
and
https://gitlab.kitware.com/cmake/cmake/blob/master/Modules/FindFontconfig.cmake#L98-101
for CMake bundled find modules that use this pattern. CMake itself isn't exactly internally consistent so I don't care if we go with this or not. Fine with whatever the preference is since we're moving to targets here.
Konstantin Tokarev
Comment 15
2019-12-11 11:56:39 PST
Comment on
attachment 385316
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=385316&action=review
>> Source/cmake/FindHarfBuzz.cmake:179 >> + set(HarfBuzz_INCLUDE_DIRS ${HarfBuzz_INCLUDE_DIR}) > > HarfBuzz_INCLUDE_DIRS is set here. > > See
https://gitlab.kitware.com/cmake/cmake/blob/master/Modules/FindTIFF.cmake#L75-76
and
https://gitlab.kitware.com/cmake/cmake/blob/master/Modules/FindFontconfig.cmake#L98-101
for CMake bundled find modules that use this pattern. CMake itself isn't exactly internally consistent so I don't care if we go with this or not. Fine with whatever the preference is since we're moving to targets here.
Oops, I've just overlooked this line
WebKit Commit Bot
Comment 16
2019-12-11 12:30:46 PST
Comment on
attachment 385316
[details]
Patch Clearing flags on attachment: 385316 Committed
r253388
: <
https://trac.webkit.org/changeset/253388
>
WebKit Commit Bot
Comment 17
2019-12-11 12:30:48 PST
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug