Bug 216639 - [CMake] Replace CMAKE_BINARY_DIR and CMAKE_SOURCE_DIR with PROJECT_BINARY_DIR and PROJECT_SOURCE_DIR
Summary: [CMake] Replace CMAKE_BINARY_DIR and CMAKE_SOURCE_DIR with PROJECT_BINARY_DIR...
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: CMake (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Fujii Hironori
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-17 00:13 PDT by Fujii Hironori
Modified: 2020-09-18 00:40 PDT (History)
22 users (show)

See Also:


Attachments
Patch (102.29 KB, patch)
2020-09-17 00:18 PDT, Fujii Hironori
no flags Details | Formatted Diff | Diff
Patch (101.44 KB, patch)
2020-09-17 00:28 PDT, Fujii Hironori
don.olmstead: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.