Skip to content

Commit 9a82f8c

Browse files
committed
Temporarily remove the crt-linkage and library-linkage options
These require a lot more work to integrate properly with vcpkg, reimplement triplet detection and set a custom triplet
1 parent 13255c6 commit 9a82f8c

File tree

6 files changed

+0
-28
lines changed

6 files changed

+0
-28
lines changed

docs/cmake-toml.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,16 +97,12 @@ include-after = ["cmake/after-subdir.cmake"]
9797
version = "2021.05.12"
9898
url = "https://github.com/microsoft/vcpkg/archive/refs/tags/2021.05.12.tar.gz"
9999
packages = ["fmt", "zlib"]
100-
crt-linkage = "dynamic"
101-
library-linkage = "dynamic"
102100
```
103101

104102
The vcpkg `version` will automatically generate the `url` from the [official repository](https://github.com/microsoft/vcpkg/releases). For a custom registry you can specify your own `url` (and omit the `version`). You can browse available packages on [vcpkg.io](https://vcpkg.io/en/packages.html).
105103

106104
To specify package features you can use the following syntax: `imgui[docking-experimental,freetype,sdl2-binding,opengl3-binding]`.
107105

108-
The `crt-linkage` specifies the MSVC runtime library variant to use while compiling packages. `library-linkage` is whether libraries built are dynamic (default) or static.
109-
110106
## Packages
111107

112108
```toml

docs/examples/vcpkg.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ description = "Dependencies from vcpkg"
2121
[vcpkg]
2222
version = "2021.05.12"
2323
packages = ["fmt"]
24-
crt-linkage = "dynamic"
25-
library-linkage = "dynamic"
2624

2725
[find-package]
2826
fmt = {}

include/project_parser.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,6 @@ struct Package {
3939
struct Vcpkg {
4040
std::string version;
4141
std::string url;
42-
std::string crt_linkage;
43-
std::string library_linkage;
4442

4543
struct Package {
4644
std::string name;

src/cmake_generator.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -638,12 +638,6 @@ void generate_cmake(const char *path, const parser::Project *parent_project) {
638638
cmd("FetchContent_GetProperties")("vcpkg");
639639
cmd("if")("NOT", "vcpkg_POPULATED");
640640
cmd("FetchContent_Populate")("vcpkg");
641-
if (!project.vcpkg.crt_linkage.empty()) {
642-
cmd("set")("VCPKG_CRT_LINKAGE", project.vcpkg.crt_linkage);
643-
}
644-
if (!project.vcpkg.library_linkage.empty()) {
645-
cmd("set")("VCPKG_LIBRARY_LINKAGE", project.vcpkg.library_linkage);
646-
}
647641
cmd("include")("${vcpkg_SOURCE_DIR}/scripts/buildsystems/vcpkg.cmake");
648642
cmd("endif")();
649643
cmd("endif")();

src/project_parser.cpp

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -628,18 +628,6 @@ Project::Project(const Project *parent, const std::string &path, bool build) {
628628
v.optional("url", vcpkg.url);
629629
v.optional("version", vcpkg.version);
630630

631-
auto handle_linkage = [&v](const toml::key &ky, std::string &value) {
632-
if (v.contains(ky)) {
633-
v.required(ky, value);
634-
if (value != "dynamic" && value != "static") {
635-
throw std::runtime_error(format_key_error("Unknown linkage, expected dynamic/static", value, v.find(ky)));
636-
}
637-
}
638-
};
639-
640-
handle_linkage("crt-linkage", vcpkg.crt_linkage);
641-
handle_linkage("library-linkage", vcpkg.library_linkage);
642-
643631
for (const auto &p : v.find("packages").as_array()) {
644632
Vcpkg::Package package;
645633
const auto &package_str = p.as_string().str;

tests/vcpkg/cmake.toml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ description = "Dependencies from vcpkg"
99
[vcpkg]
1010
version = "2021.05.12"
1111
packages = ["fmt"]
12-
crt-linkage = "dynamic"
13-
library-linkage = "dynamic"
1412

1513
[find-package]
1614
fmt = {}

0 commit comments

Comments
 (0)