Bug 216639

Summary: [CMake] Replace CMAKE_BINARY_DIR and CMAKE_SOURCE_DIR with PROJECT_BINARY_DIR and PROJECT_SOURCE_DIR
Product: WebKit Reporter: Fujii Hironori <Hironori.Fujii>
Component: CMakeAssignee: Fujii Hironori <Hironori.Fujii>
Status: RESOLVED WONTFIX    
Severity: Normal CC: annulen, benjamin, berto, cdumez, cgarcia, cmarcelo, don.olmstead, ews-watchlist, gustavo, gyuyoung.kim, hi, jbedard, keith_miller, krollin, mark.lam, msaboff, rniwa, ross.kirsling, ryuan.choi, saam, sergio, tzagallo
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch
none
Patch don.olmstead: review-

Description Fujii Hironori 2020-09-17 00:13:21 PDT
[CMake] Replace CMAKE_BINARY_DIR and CMAKE_SOURCE_DIR with PROJECT_BINARY_DIR and PROJECT_SOURCE_DIR

So that outside CMake projects can use WebKit as a submodule by add_subdirectory(WebKit).
Comment 1 Fujii Hironori 2020-09-17 00:18:29 PDT
Created attachment 408999 [details]
Patch
Comment 2 Fujii Hironori 2020-09-17 00:28:08 PDT
Created attachment 409000 [details]
Patch
Comment 3 Don Olmstead 2020-09-17 12:50:35 PDT
Comment on attachment 409000 [details]
Patch

I really think any project trying to use WebKit like this should be using https://cmake.org/cmake/help/latest/module/ExternalProject.html
Comment 4 Konstantin Tokarev 2020-09-17 13:00:05 PDT
I agree, add_subdirectory(WebKit) has big potential of changing global CMake state and we certainly don't want to debug such cases.