Skip to content
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

[rollup] Rollup PR 2021-07-16 #19001

Merged
merged 8 commits into from
Jul 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/maintainers/portfile-functions.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
- [vcpkg\_install\_msbuild](vcpkg_install_msbuild.md)
- [vcpkg\_install\_nmake](vcpkg_install_nmake.md)
- [vcpkg\_install\_qmake](vcpkg_install_qmake.md)
- [vcpkg\_list](vcpkg_list.md)
- [vcpkg\_minimum\_required](vcpkg_minimum_required.md)
- [vcpkg\_replace\_string](vcpkg_replace_string.md)

Expand Down
7 changes: 7 additions & 0 deletions docs/maintainers/ports/vcpkg-cmake/vcpkg_cmake_configure.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ vcpkg_cmake_configure(
<configure-setting>...]
[OPTIONS_DEBUG
<configure-setting>...]
[MAYBE_UNUSED_VARIABLES
<variable-name>...]
)
```

Expand Down Expand Up @@ -56,6 +58,11 @@ By default, this function adds flags to `CMAKE_C_FLAGS` and `CMAKE_CXX_FLAGS`
which set the default character set to utf-8 for MSVC.
If the library sets its own code page, pass the `NO_CHARSET_FLAG` option.

This function makes certain that all options passed in are used by the
underlying CMake build system. If there are options that might be unused,
perhaps on certain platforms, pass those variable names to
`MAYBE_UNUSED_VARIABLES`.

`LOGFILE_BASE` is used to set the base of the logfile names;
by default, this is `config`, and thus the logfiles end up being something like
`config-x86-windows-dbg.log`. You can set it to anything you like;
Expand Down
4 changes: 4 additions & 0 deletions docs/maintainers/vcpkg_configure_cmake.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ vcpkg_configure_cmake(
[OPTIONS <-DUSE_THIS_IN_ALL_BUILDS=1>...]
[OPTIONS_RELEASE <-DOPTIMIZE=1>...]
[OPTIONS_DEBUG <-DDEBUGGABLE=1>...]
[MAYBE_UNUSED_VARIABLES <option-name>...]
)
```

Expand Down Expand Up @@ -55,6 +56,9 @@ Additional options passed to CMake during the Release configuration. These are i
### OPTIONS_DEBUG
Additional options passed to CMake during the Debug configuration. These are in addition to `OPTIONS`.

### MAYBE_UNUSED_VARIABLES
Any CMake variables which are explicitly passed in, but which may not be used on all platforms.

### LOGNAME
Name of the log to write the output of the configure call to.

Expand Down
94 changes: 94 additions & 0 deletions docs/maintainers/vcpkg_list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
# vcpkg_list

The latest version of this document lives in the [vcpkg repo](https://github.com/Microsoft/vcpkg/blob/master/docs/maintainers/vcpkg_list.md).

A replacement for CMake's `list()` function, which correctly handles elements
with internal semicolons (in other words, escaped semicolons).
Use `vcpkg_list()` instead of `list()` whenever possible.

```cmake
vcpkg_list(SET <out-var> [<element>...])
vcpkg_list(<COMMAND> <list-var> [<other-arguments>...])
```

In addition to all of the commands from `list()`, `vcpkg_list` adds
a `vcpkg_list(SET)` command.
This command takes its arguments, escapes them, and then concatenates
them into a list; this should be used instead of `set()` for setting any
list variable.

Otherwise, the `vcpkg_list()` function is the same as the built-in
`list()` function, with the following restrictions:

- `GET`, `REMOVE_ITEM`, and `REMOVE_AT` support only one index/value
- `POP_BACK` and `POP_FRONT` do not support getting the value into
another out variable. Use C++ style `GET` then `POP_(BACK|FRONT)`.
- `FILTER` and `TRANSFORM` are unsupported.

See the [CMake documentation for `list()`](https://cmake.org/cmake/help/latest/command/list.html)
for more information.

## Notes: Some Weirdnesses

The most major weirdness is due to `""` pulling double-duty as "list of zero elements",
and "list of one element, which is empty". `vcpkg_list` always uses the former understanding.
This can cause weird behavior, for example:

```cmake
set(lst "")
vcpkg_list(APPEND lst "" "")
# lst = ";"
```

This is because you're appending two elements to the empty list.
One very weird behavior that comes out of this would be:

```cmake
set(lst "")
vcpkg_list(APPEND lst "")
# lst = ""
```

since `""` is the empty list, we append the empty element and end up with a list
of one element, which is empty. This does not happen for non-empty lists;
for example:

```cmake
set(lst "a")
vcpkg_list(APPEND lst "")
# lst = "a;"
```

only the empty list has this odd behavior.

## Examples

### Creating a list

```cmake
vcpkg_list(SET foo_param)
if(DEFINED arg_FOO)
vcpkg_list(SET foo_param FOO "${arg_FOO}")
endif()
```

### Appending to a list

```cmake
set(OPTIONS -DFOO=BAR)
if(VCPKG_TARGET_IS_WINDOWS)
vcpkg_list(APPEND OPTIONS "-DOS=WINDOWS;FOO")
endif()
```

### Popping the end off a list

```cmake
if(NOT list STREQUAL "")
vcpkg_list(GET list end -1)
vcpkg_list(POP_BACK list)
endif()
```

## Source
[scripts/cmake/vcpkg\_list.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_list.cmake)
3 changes: 1 addition & 2 deletions docs/maintainers/vcpkg_replace_string.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ The latest version of this document lives in the [vcpkg repo](https://github.com
Replace a string in a file.

```cmake
vcpkg_replace_string(filename match_string replace_string)
vcpkg_replace_string(<filename> <match> <replace>)
```


## Source
[scripts/cmake/vcpkg\_replace\_string.cmake](https://github.com/Microsoft/vcpkg/blob/master/scripts/cmake/vcpkg_replace_string.cmake)
9 changes: 0 additions & 9 deletions ports/apr/CONTROL

This file was deleted.

3 changes: 2 additions & 1 deletion ports/apr/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ vcpkg_extract_source_archive_ex(

if (VCPKG_TARGET_IS_WINDOWS)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
private-headers INSTALL_PRIVATE_H
FEATURES
private-headers INSTALL_PRIVATE_H
)

vcpkg_configure_cmake(
Expand Down
13 changes: 13 additions & 0 deletions ports/apr/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"name": "apr",
"version": "1.7.0",
"port-version": 4,
"description": "The Apache Portable Runtime (APR) is a C library that forms a system portability layer that covers many operating systems.",
"homepage": "https://apr.apache.org/",
"supports": "!uwp",
"features": {
"private-headers": {
"description": "Install non-standard files required for building Apache httpd"
}
}
}
12 changes: 0 additions & 12 deletions ports/azure-iot-sdk-c/CONTROL

This file was deleted.

7 changes: 4 additions & 3 deletions ports/azure-iot-sdk-c/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@ else()
endif()

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
use-prov-client hsm_type_symm_key
use-prov-client use_prov_client
FEATURES
use-prov-client hsm_type_symm_key
use-prov-client use_prov_client
)

file(COPY ${CURRENT_INSTALLED_DIR}/share/azure-c-shared-utility/azure_iot_build_rules.cmake DESTINATION ${SOURCE_PATH}/deps/azure-c-shared-utility/configs/)
Expand All @@ -51,4 +52,4 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include ${CURRENT_PACKAGES_DIR

configure_file(${SOURCE_PATH}/LICENSE ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)

vcpkg_copy_pdbs()
vcpkg_copy_pdbs()
62 changes: 62 additions & 0 deletions ports/azure-iot-sdk-c/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"name": "azure-iot-sdk-c",
"version-date": "2020-12-09",
"port-version": 1,
"description": "A C99 SDK for connecting devices to Microsoft Azure IoT services",
"homepage": "https://github.com/Azure/azure-iot-sdk-c",
"dependencies": [
"azure-c-shared-utility",
"azure-macro-utils-c",
"azure-uamqp-c",
"azure-uhttp-c",
"azure-umqtt-c",
"parson",
"umock-c"
],
"features": {
"public-preview": {
"description": "A version of the azure-iot-sdk-c containing public-preview features.",
"dependencies": [
{
"name": "azure-c-shared-utility",
"features": [
"public-preview"
]
},
{
"name": "azure-macro-utils-c",
"features": [
"public-preview"
]
},
{
"name": "azure-uamqp-c",
"features": [
"public-preview"
]
},
{
"name": "azure-uhttp-c",
"features": [
"public-preview"
]
},
{
"name": "azure-umqtt-c",
"features": [
"public-preview"
]
},
{
"name": "umock-c",
"features": [
"public-preview"
]
}
]
},
"use-prov-client": {
"description": "Enables device provisioning client for DPS"
}
}
}
13 changes: 0 additions & 13 deletions ports/azure-kinect-sensor-sdk/CONTROL

This file was deleted.

5 changes: 3 additions & 2 deletions ports/azure-kinect-sensor-sdk/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,9 @@ get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY)
vcpkg_add_to_path("${PYTHON3_DIR}")

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
docs K4A_BUILD_DOCS
tool BUILD_TOOLS
FEATURES
docs K4A_BUILD_DOCS
tool BUILD_TOOLS
)

# .rc file needs windows.h, so do not use PREFER_NINJA here
Expand Down
45 changes: 45 additions & 0 deletions ports/azure-kinect-sensor-sdk/vcpkg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"name": "azure-kinect-sensor-sdk",
"version": "1.4.1",
"port-version": 1,
"description": "Azure Kinect SDK is a cross platform (Linux and Windows) user mode SDK to read data from your Azure Kinect device.",
"homepage": "https://github.com/microsoft/Azure-Kinect-Sensor-SDK",
"supports": "!osx",
"dependencies": [
"azure-c-shared-utility",
"cjson",
"ebml",
"glfw3",
"gtest",
"imgui",
"libjpeg-turbo",
"libsoundio",
"libusb",
{
"name": "libuvc",
"platform": "linux"
},
"libyuv",
"matroska",
"spdlog"
],
"features": {
"docs": {
"description": "Build K4A doxygen documentation."
},
"tool": {
"description": "Build tools.",
"dependencies": [
"gl3w",
"glew",
{
"name": "imgui",
"features": [
"glfw-binding",
"opengl3-glew-binding"
]
}
]
}
}
}
22 changes: 0 additions & 22 deletions ports/bitserializer/CONTROL

This file was deleted.

9 changes: 5 additions & 4 deletions ports/bitserializer/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ vcpkg_from_bitbucket(
)

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
"cpprestjson-archive" BUILD_CPPRESTJSON_ARCHIVE
"rapidjson-archive" BUILD_RAPIDJSON_ARCHIVE
"pugixml-archive" BUILD_PUGIXML_ARCHIVE
"rapidyaml-archive" BUILD_RAPIDYAML_ARCHIVE
FEATURES
"cpprestjson-archive" BUILD_CPPRESTJSON_ARCHIVE
"rapidjson-archive" BUILD_RAPIDJSON_ARCHIVE
"pugixml-archive" BUILD_PUGIXML_ARCHIVE
"rapidyaml-archive" BUILD_RAPIDYAML_ARCHIVE
)

vcpkg_configure_cmake(
Expand Down
Loading