Currently WinCairo cannot use find_package for any of the third party libraries that have build in support within CMake (cURL, ZLIB, etc). CMAKE_PREFIX_PATH can be used to set a search path for those libraries. By adding WEBKIT_LIBRARIES_DIR to the CMAKE_PREFIX_PATH find_package works as expected. This also requires setting a global hint for CMake to look into lib32/lib64 directories to match the current directory structure. This also means that the explicit including of WEBKIT_LIBRARIES_DIR within the WebKit specific finds (Cairo) are not necessary.
Just a heads up that FIND_LIBRARY_USE_LIB32_PATHS doesn't appear to be available until CMake 3.7. This means the same ideas cannot currently be applied to AppleWin. WinCairo only does 64 bit builds so this limitation isn't there.
Created attachment 306957 [details] Patch with CMake changes
(In reply to Don Olmstead from comment #1) > Just a heads up that FIND_LIBRARY_USE_LIB32_PATHS doesn't appear to be > available until CMake 3.7. This means the same ideas cannot currently be > applied to AppleWin. WinCairo only does 64 bit builds so this limitation > isn't there. Then we shouldn't use it yet.
(In reply to Alex Christensen from comment #3) > (In reply to Don Olmstead from comment #1) > > Just a heads up that FIND_LIBRARY_USE_LIB32_PATHS doesn't appear to be > > available until CMake 3.7. This means the same ideas cannot currently be > > applied to AppleWin. WinCairo only does 64 bit builds so this limitation > > isn't there. > > Then we shouldn't use it yet. When do the AppleWin bots get updated? Our WinCairo buildbot has CMake 3.7.2 and should soon have 3.8.0 installed on it. I foresee us requiring at least 3.8.0 for WinCairo development in the near future as we're about ready to update the libraries and find_package(OpenSSL) does not properly detect libressl on Windows until 3.8.0.
Comment on attachment 306957 [details] Patch with CMake changes Let's assume updating anything in the AppleWin build tools takes a really long time.
Comment on attachment 306957 [details] Patch with CMake changes Clearing flags on attachment: 306957 Committed r215326: <http://trac.webkit.org/changeset/215326>
All reviewed patches have been landed. Closing bug.