diff options
author | Brian Osman <brianosman@google.com> | 2016-12-14 11:06:04 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-12-14 16:41:52 +0000 |
commit | 2052c86a30dffcf124fd7beac293e7fce87bf5cb (patch) | |
tree | b30cd5b9fec70c1d3a07470484fe761ce12aa419 | |
parent | 8dcc84f7dc8523dd90501a4feb1f632808337c34 (diff) |
Move, rename, and document Visual Studio GN helper script
BUG=skia:
DOCS_PREVIEW= https://skia.org/?cl=5983
Change-Id: I32ac2c5275eb86adaa2be9ceee061b2956db70ad
Reviewed-on: https://skia-review.googlesource.com/5983
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
-rw-r--r-- | gn/gn_meta_sln.py (renamed from fix-gn-sln.py) | 0 | ||||
-rw-r--r-- | site/user/build.md | 25 |
2 files changed, 21 insertions, 4 deletions
diff --git a/fix-gn-sln.py b/gn/gn_meta_sln.py index 2cb4ae59ae..2cb4ae59ae 100644 --- a/fix-gn-sln.py +++ b/gn/gn_meta_sln.py diff --git a/site/user/build.md b/site/user/build.md index e5ef3d43ed..37a17b6132 100644 --- a/site/user/build.md +++ b/site/user/build.md @@ -84,10 +84,8 @@ Windows ------- Skia can build on Windows with Visual Studio 2015 Update 3. No older or newer -version is supported. If you use Visual Studio, you may want to pass -`--ide=vs` to `gn gen` to generate `all.sln`. - -The bots use a packaged toolchain, which you may be able to download like this: +version is supported. The bots use a packaged toolchain, which you may be able +to download like this: python infra/bots/assets/win_toolchain/download.py -t C:/toolchain @@ -95,6 +93,25 @@ If you pass that downloaded path to GN via `windk`, you can build using that toolchain instead of your own from Visual Studio. This toolchain is the only way we support 32-bit builds, by also setting `target_cpu="x86"`. +### Visual Studio Solutions + +If you use Visual Studio, you may want to pass `--ide=vs` to `gn gen` to +generate `all.sln`. That solution will exist within the GN directory for the +specific configuration, and will only build/run that configuration. + +If you want a Visual Studio Solution that supports multiple GN configurations, +there is a helper script. It requires that all of your GN directories be inside +the `out` directory. First, create all of your GN configurations as usual. +Pass `--ide=vs` when running `gn gen` for each one. Then: + + python gn/gn_meta_sln.py + +This creates a new dedicated output directory and solution file +`out/sln/skia.sln`. It has one solution configuration for each GN configuration, +and supports building and running any of them. It also adjusts syntax highlighting +of inactive code blocks based on preprocessor definitions from the selected +solution configuration. + CMake ----- |