-
-
Notifications
You must be signed in to change notification settings - Fork 349
Initial VCPkg integration #4226
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from 12 commits
217ad69
cccb361
d3e983b
b5f070c
52de2a6
282785e
12d1fdd
705be7b
16b87e6
a8fecc5
a7d5fd8
a560ee0
7ce7088
2f3c24f
70fef43
20ce478
2ffe5d4
076d2d9
4ec11b5
8e22ef5
93630d3
93233b0
9147eab
7e7727f
3b89b13
ce40138
a7f5858
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -809,6 +809,8 @@ def tool_list(platform, env): | |
| 'tar', 'zip', | ||
| # File builders (text) | ||
| 'textfile', | ||
| # Package management | ||
| 'vcpkg', | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems like this should be a win32 only thing? Or does it work on all platforms?
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Looks like win, linux, and macos. So it shouldn't be in default list. (BSD's not supported?, hpux, solaris, aix, other evil remnants of the past which are still in use(that's not referring to BSDs, but rather the others.. ;)
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. further review looks like your implementation is win32 only, so should be only in that platforms default tool list above. under
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My implementation is not Win32-only. I've tested on Ubuntu and Windows, and it should work on Mac as well, though I don't have the ability to test Mac, as I don't own one. OK, so if I'm understanding correctly, I should conditionally add this to other_plat_tools on platforms where it's supported.
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. add it to
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ummm...how do I detect "linux"? It seems like tools such as m4 and rpm are being added simply based on "not win32". Is there a positive test I can do to detect a linux system?
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Eh, that's a little complex. Depending on where you're asking... a simple way is to check |
||
| ], env) | ||
|
|
||
| tools = [ | ||
|
|
||
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,97 @@ | ||
| <?xml version="1.0"?> | ||
| <!-- | ||
| __COPYRIGHT__ | ||
|
|
||
| This file is processed by the bin/SConsDoc.py module. | ||
| See its __doc__ string for a discussion of the format. | ||
| --> | ||
|
|
||
| <!DOCTYPE sconsdoc [ | ||
| <!ENTITY % scons SYSTEM '../../doc/scons.mod'> | ||
| %scons; | ||
| <!ENTITY % builders-mod SYSTEM '../../doc/generated/builders.mod'> | ||
| %builders-mod; | ||
| <!ENTITY % functions-mod SYSTEM '../../doc/generated/functions.mod'> | ||
| %functions-mod; | ||
| <!ENTITY % tools-mod SYSTEM '../../doc/generated/tools.mod'> | ||
| %tools-mod; | ||
| <!ENTITY % variables-mod SYSTEM '../../doc/generated/variables.mod'> | ||
| %variables-mod; | ||
| ]> | ||
|
|
||
| <sconsdoc xmlns="http://www.scons.org/dbxsd/v1.0" | ||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:schemaLocation="http://www.scons.org/dbxsd/v1.0 http://www.scons.org/dbxsd/v1.0/scons.xsd"> | ||
|
|
||
| <tool name="vcpkg"> | ||
| <summary> | ||
| <para> | ||
| Sets construction variables for the &vcpkg; package manager | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The generated entities for a tool named ERROR: SCons/Tool/vcpkg.xml fails to parse:
Entity 'vcpkg' not defined, line 29, column 60 (vcpkg.xml, line 29) |
||
| </para> | ||
| </summary> | ||
| <uses> | ||
| <item>VCPKGROOT</item> | ||
| <item>VCPKGDEBUG</item> | ||
| </uses> | ||
| </tool> | ||
|
|
||
| <builder name="VCPkg"> | ||
| <summary> | ||
| <para> | ||
| Downloads and builds one or more software packages (plus any dependencies of those packages) via the | ||
| &vcpkg; package manager, making the built artifcats available for other builders. | ||
| </para> | ||
|
|
||
| <example_commands> | ||
| # Install FreeImage, plus any of its dependencies | ||
| env.VCPkg('freeimage') | ||
| </example_commands> | ||
|
|
||
| <para> | ||
| &vcpkg; is distributed as a Git repository, containing the &vcpkg; executable (or a script to build it) | ||
| and a "snapshot" of the current versions of all available packages. A typical usage pattern is for your | ||
| project to incorporate &vcpkg; as a Git submodule underneath your project (run 'git submodule --help'), | ||
| though system-wide installation is also supported. | ||
| </para> | ||
|
|
||
| <para> | ||
| Packages built with &vcpkg; may produce header files, static libraries and shared libraries | ||
| (<filename>.dll</filename>/<filename>.so</filename> files). The &vcpkg;-internal directores | ||
| containing these built artifacts are added to &cv-link-CPPPATH; and &cv-link-LIBPATH; and | ||
| &cv-link-PATH;, respectively. | ||
| </para> | ||
|
|
||
| </summary> | ||
| </builder> | ||
|
|
||
| <cvar name="VCPKGROOT"> | ||
| <summary> | ||
| <para> | ||
| Specifies the path to the root directory of the &vcpkg; installation. This must be set in the | ||
| SConstruct/SConscript file, and must point to an existing &vcpkg; installation. Often, this directory | ||
| will be a Git sub-module of your project, in which case VCPKGROOT will be specified relative to the | ||
| project root. | ||
| </para> | ||
|
|
||
| <example_commands> | ||
| # vcpkg is a submodule located in the 'vcpkg' directory underneath the project root | ||
| env['VCPKGROOT'] = '#/vcpkg' | ||
| </example_commands> | ||
| </summary> | ||
| </cvar> | ||
|
|
||
| <cvar name="VCPKGDEBUG"> | ||
| <summary> | ||
| <para> | ||
| Specifies whether &vcpkg; should build debug or optimized versions of packages. If True, then "debug" | ||
| packages will be built, with full debugging information and most optimizations disabled. If False (or | ||
| unset), then packages will be built using optimized settings. | ||
| </para> | ||
| <para> | ||
| Note that, while you may choose to set this to match the optimization settings of your project's build, | ||
| this is not required: it's perfectly fine to use optimized packages with a "debug" build of your project. | ||
| </para> | ||
| </summary> | ||
| </cvar> | ||
|
|
||
| </sconsdoc> | ||
Uh oh!
There was an error while loading. Please reload this page.