Bug 160904

Summary: Use find_library within Windows build
Product: WebKit Reporter: Don Olmstead <don.olmstead>
Component: PlatformAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: achristensen, bfulgham, commit-queue, gyuyoung.kim, mcatanzaro, mrobinson, ossy, pvollan
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 160949    
Bug Blocks:    
Attachments:
Description Flags
FindICU fixes
none
FindICU fixes
none
FindICU fixes
none
FindICU fixes
none
FindICU with comments
none
Archive of layout-test-results from ews122 for ios-simulator-elcapitan-wk2 none

Don Olmstead
Reported 2016-08-16 11:41:49 PDT
Currently the Windows implementation does not use the Find* in Source/cmake. For consistency it would be great to have the Windows implementation using Find for its implementation. This is a meta bug for figuring out how to go about this and then start going after each individual library.
Attachments
FindICU fixes (13.34 KB, patch)
2016-08-16 15:50 PDT, Don Olmstead
no flags
FindICU fixes (6.50 KB, patch)
2016-08-16 15:52 PDT, Don Olmstead
no flags
FindICU fixes (6.33 KB, patch)
2016-08-16 16:15 PDT, Don Olmstead
no flags
FindICU fixes (7.75 KB, patch)
2016-08-16 16:30 PDT, Don Olmstead
no flags
FindICU with comments (6.08 KB, patch)
2016-08-16 19:09 PDT, Don Olmstead
no flags
Archive of layout-test-results from ews122 for ios-simulator-elcapitan-wk2 (769.34 KB, application/zip)
2016-08-16 21:28 PDT, Build Bot
no flags
Don Olmstead
Comment 1 2016-08-16 11:49:36 PDT
On Windows WebKitLibraries/win is the root for third party libraries in the project. In CMake the WEBKIT_LIBRARIES_DIR is set for this. So within FindICU.cmake you can do the following which allows Windows to find it. find_path( ICU_INCLUDE_DIR NAMES unicode/utypes.h HINTS ${PC_ICU_INCLUDE_DIRS} ${PC_ICU_INCLUDEDIR} ${WEBKIT_LIBRARIES_DIR}/include DOC "Include directory for the ICU library") mark_as_advanced(ICU_INCLUDE_DIR) One thing I'm wondering however is should the be a WEBKIT_LIBRARIES_ROOT and then some variables around that be added. So WEBKIT_LIBRARIES_INCLUDE_DIR/WEBKIT_LIBRARIES_LINKER_DIR which would then be used within the HINTS section.
Don Olmstead
Comment 2 2016-08-16 15:50:45 PDT
Created attachment 286219 [details] FindICU fixes Uses find_package(ICU REQUIRED) for Windows builds
Don Olmstead
Comment 3 2016-08-16 15:52:55 PDT
Created attachment 286221 [details] FindICU fixes
Don Olmstead
Comment 4 2016-08-16 16:15:43 PDT
Created attachment 286228 [details] FindICU fixes
Don Olmstead
Comment 5 2016-08-16 16:30:32 PDT
Created attachment 286231 [details] FindICU fixes One more time...hopefully
Alex Christensen
Comment 6 2016-08-16 16:34:07 PDT
Comment on attachment 286228 [details] FindICU fixes View in context: https://bugs.webkit.org/attachment.cgi?id=286228&action=review This needs a ChangeLog entry. Please use Tools/Scripts/prepare-ChangeLog to generate templates. > Source/cmake/OptionsWin.cmake:106 > + # TODO Remove ${WEBKIT_LIBRARIES_LINK_DIR} when find_library is used for everything FIXME: is used in WebKit. > Source/cmake/OptionsWin.cmake:113 > +include(WebKitLibraries) The contents of WebKitLibraries.cmake should probably just go here instead of making another file. > Source/cmake/OptionsWin.cmake:115 > +include_directories("${CMAKE_BINARY_DIR}/DerivedSources/ForwardingHeaders" "${CMAKE_BINARY_DIR}/DerivedSources" "${WEBKIT_LIBRARIES_INCLUDE_DIR}") This should not be here. > Source/cmake/OptionsWinCairo.cmake:5 > +find_package(ICU REQUIRED) This is needed for AppleWin, too. > Source/cmake/WebKitLibraries.cmake:17 > + set(WEBKIT_LIBRARIES_LINK_DIR "${WEBKIT_LIBRARIES_DIR}/lib") If this were in OptionsWin, it would be more obvious that this only applies when building for your port.
Don Olmstead
Comment 7 2016-08-16 16:57:56 PDT
(In reply to comment #6) > Comment on attachment 286228 [details] > FindICU fixes > > View in context: > https://bugs.webkit.org/attachment.cgi?id=286228&action=review > > This needs a ChangeLog entry. Please use Tools/Scripts/prepare-ChangeLog to > generate templates. > Still working my way around prepare-Changelog. Should have the hang of it soon. > > Source/cmake/OptionsWin.cmake:106 > > + # TODO Remove ${WEBKIT_LIBRARIES_LINK_DIR} when find_library is used for everything > > FIXME: is used in WebKit. > > > Source/cmake/OptionsWin.cmake:113 > > +include(WebKitLibraries) > > The contents of WebKitLibraries.cmake should probably just go here instead > of making another file. > I had planned on using the file within our out of trunk port till it can land. I've been following the same conventions within it. > > Source/cmake/OptionsWin.cmake:115 > > +include_directories("${CMAKE_BINARY_DIR}/DerivedSources/ForwardingHeaders" "${CMAKE_BINARY_DIR}/DerivedSources" "${WEBKIT_LIBRARIES_INCLUDE_DIR}") > > This should not be here. Not sure what you mean here. It should be equivalent to what was at that position. > > > Source/cmake/OptionsWinCairo.cmake:5 > > +find_package(ICU REQUIRED) > > This is needed for AppleWin, too. > I'll move it to OptionsWin. > > Source/cmake/WebKitLibraries.cmake:17 > > + set(WEBKIT_LIBRARIES_LINK_DIR "${WEBKIT_LIBRARIES_DIR}/lib") > > If this were in OptionsWin, it would be more obvious that this only applies > when building for your port.
Don Olmstead
Comment 8 2016-08-16 19:09:28 PDT
Created attachment 286250 [details] FindICU with comments Ok this is a straightforward version of the patch with the include taken out.
Build Bot
Comment 9 2016-08-16 21:28:05 PDT
Comment on attachment 286250 [details] FindICU with comments Attachment 286250 [details] did not pass ios-sim-ews (ios-simulator-wk2): Output: http://webkit-queues.webkit.org/results/1884804 New failing tests: fast/scrolling/ios/scrollTo-at-page-load.html
Build Bot
Comment 10 2016-08-16 21:28:08 PDT
Created attachment 286266 [details] Archive of layout-test-results from ews122 for ios-simulator-elcapitan-wk2 The attached test failures were seen while running run-webkit-tests on the ios-sim-ews. Bot: ews122 Port: ios-simulator-elcapitan-wk2 Platform: Mac OS X 10.11.5
Brent Fulgham
Comment 11 2016-08-17 15:17:03 PDT
Comment on attachment 286250 [details] FindICU with comments View in context: https://bugs.webkit.org/attachment.cgi?id=286250&action=review I can confirm that this patch builds properly on a local Windows development machine. The build failure was due to an existing WIndows problem that has since been fixed. Note that we need to land Bug 160949 before this one. > Source/cmake/FindICU.cmake:82 > + set(ICU_DATA_LIBRARIES) I wonder if set(ICU_DATA_LIBRARIES ${ICU_DATA_LIBRARY}) just does the right thing in the case of no ICU_DATA_LIBRARY value...
Brent Fulgham
Comment 12 2016-08-17 15:22:14 PDT
I don't see how this CMake change possibly affects the iOS simulator build, given that none of the iOS or macOS builds use CMake.
Don Olmstead
Comment 13 2016-08-17 16:02:49 PDT
(In reply to comment #11) > Comment on attachment 286250 [details] > FindICU with comments > > View in context: > https://bugs.webkit.org/attachment.cgi?id=286250&action=review > > I can confirm that this patch builds properly on a local Windows development > machine. The build failure was due to an existing WIndows problem that has > since been fixed. > > Note that we need to land Bug 160949 before this one. > > > Source/cmake/FindICU.cmake:82 > > + set(ICU_DATA_LIBRARIES) > > I wonder if set(ICU_DATA_LIBRARIES ${ICU_DATA_LIBRARY}) just does the right > thing in the case of no ICU_DATA_LIBRARY value... It should. In our setup we have the data libraries and it works fine. On WinCairo it didnt find them and I don't see it in the Additional Dependencies within VS.
WebKit Commit Bot
Comment 14 2016-08-17 16:31:26 PDT
Comment on attachment 286250 [details] FindICU with comments Clearing flags on attachment: 286250 Committed r204581: <http://trac.webkit.org/changeset/204581>
WebKit Commit Bot
Comment 15 2016-08-17 16:31:32 PDT
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.