[Webkit-unassigned] [Bug 196792] New: [CMake] Add interface targets for frameworks
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Apr 10 16:29:37 PDT 2019
https://bugs.webkit.org/show_bug.cgi?id=196792
Bug ID: 196792
Summary: [CMake] Add interface targets for frameworks
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: CMake
Assignee: webkit-unassigned at lists.webkit.org
Reporter: don.olmstead at sony.com
CC: achristensen at apple.com, annulen at yandex.ru,
bfulgham at webkit.org, lforschler at apple.com,
mcatanzaro at igalia.com, pvollan at apple.com
Blocks: 196704
CMake has a concept of INTERFACE libraries. These are not actual targets you build but instead can be used to propagate dependencies to targets. See See https://cmake.org/cmake/help/latest/command/add_library.html#interface-libraries for a full explanation.
Each framework, WTF, JSC, etc, would have an associated ${_framework}Framework target. As an example JavaScriptCore would have a JavaScriptCoreFramework target. This would depend on JavaScriptCoreFrameworkHeaders, the public framework headers, JavaScriptCorePrivateFrameworkHeaders, the private framework headers, and the JavaScriptCore library. It would propagate the include directories and the required dependencies to the referencing project. So WebCore would not depend on JavaScriptCore it would depend on JavaScriptCoreFramework. This would setup the includes and everything else needed for the project.
The thing that throws a wrench into some of this is the AppleWin Internal Build. With that build CMake is invoked in each sub directory. This is why there are multiple instances of things like JavaScriptCore${DEBUG_SUFFIX} when setting target_link_libraries. With target_link_libraries it can be passed a TARGET or the library name. In the case of the AppleWin Internal Build the ${_framework}${DEBUG_SUFFIX} form is needed because its not a defined target in this case its a library name. So with this wrapping we want to use the ${_framework}Framework target to handle the internal build. With internal builds it will specify the libraries as well as any special include directories used by the internal build.
This is done in support of https://bugs.webkit.org/show_bug.cgi?id=196704
Referenced Bugs:
https://bugs.webkit.org/show_bug.cgi?id=196704
[Bug 196704] [Meta][CMake] Refactoring CMake project to target-oriented design
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20190410/bfb7b73e/attachment.html>
More information about the webkit-unassigned
mailing list