Bug 124478 - [EFL] Add EWebKitConfig.cmake and EWebKit2Config.cmake
Summary: [EFL] Add EWebKitConfig.cmake and EWebKit2Config.cmake
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit EFL (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Ryuan Choi
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-11-17 22:53 PST by Ryuan Choi
Modified: 2013-11-18 03:29 PST (History)
6 users (show)

See Also:


Attachments
Patch (8.36 KB, patch)
2013-11-17 23:01 PST, Ryuan Choi
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ryuan Choi 2013-11-17 22:53:31 PST
EWebKit(2)Config.cmake will be useful for CMake based applications to use EWebKit(2).
Comment 1 Ryuan Choi 2013-11-17 23:01:34 PST
Created attachment 217169 [details]
Patch
Comment 2 Gyuyoung Kim 2013-11-17 23:11:49 PST
(In reply to comment #0)
> EWebKit(2)Config.cmake will be useful for CMake based applications to use EWebKit(2).

I don't understand what is benefit when we install EWebLit(2)Confit.cmake to /lib/cmake/EWebKit.
Comment 3 Ryuan Choi 2013-11-17 23:46:25 PST
(In reply to comment #2)
> (In reply to comment #0)
> > EWebKit(2)Config.cmake will be useful for CMake based applications to use EWebKit(2).
> 
> I don't understand what is benefit when we install EWebLit(2)Confit.cmake to /lib/cmake/EWebKit.

Now, there are two options for applications to use ewebkit(2).
First option is using pkg_config_modules. It will check ewebkit(2).pc
Second option is makind their own FindEWebKit.cmake such as what we did internally for cairo, libsoup and other modules.

Although CMake provide pkg_check_modules(first option) but it's not preferred.
Instead, cmake applications like find_package(XXX) but it's a burden for applications that each applications add their own FindXXX.cmake.

If we provide EWebKit(2)Config.cmake, applications can use find_package(EWebKit(2) ..).

Please see below url for some more information.
http://www.cmake.org/Wiki/CMake/Tutorials/How_to_create_a_ProjectConfig.cmake_file
Comment 4 Gyuyoung Kim 2013-11-18 00:07:34 PST
Comment on attachment 217169 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=217169&action=review

> Source/WebKit2/PlatformEfl.cmake:373
> +        DESTINATION lib/cmake/EWebKit2)

I see. BTW, I wonder how can application know this location(lib/cmake/EWebKit(2)) to get EWebKit2Config|Version.cmake.
Comment 5 Ryuan Choi 2013-11-18 00:28:03 PST
(In reply to comment #4)
> (From update of attachment 217169 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=217169&action=review
> 
> > Source/WebKit2/PlatformEfl.cmake:373
> > +        DESTINATION lib/cmake/EWebKit2)
> 
> I see. BTW, I wonder how can application know this location(lib/cmake/EWebKit(2)) to get EWebKit2Config|Version.cmake.

applications doesn't need to know, but they probably gave prefix.(default prefix is /usr and /usr/local)

Then, find_package() will search several directories including it from given prefix.

http://www.cmake.org/cmake/help/v2.8.10/cmake.html#command:find_package

<prefix>/(lib/<arch>|lib|share)/cmake/<name>*/ is first and good location on unix system.
Comment 6 WebKit Commit Bot 2013-11-18 03:29:32 PST
Comment on attachment 217169 [details]
Patch

Clearing flags on attachment: 217169

Committed r159414: <http://trac.webkit.org/changeset/159414>
Comment 7 WebKit Commit Bot 2013-11-18 03:29:36 PST
All reviewed patches have been landed.  Closing bug.