diff options
| author | Robert Schumacher <roschuma@microsoft.com> | 2020-02-12 15:58:43 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-02-12 15:58:43 -0800 |
| commit | 5deea3b975fe62990973d73a102de818d83ba20c (patch) | |
| tree | 99409a35c4ec06bca6d2f478418025317f6339c9 /scripts/cmake/vcpkg_fixup_cmake_targets.cmake | |
| parent | c36db6d3be1d2b4af843739752d267940e632b23 (diff) | |
| download | vcpkg-5deea3b975fe62990973d73a102de818d83ba20c.tar.gz vcpkg-5deea3b975fe62990973d73a102de818d83ba20c.zip | |
[vcpkg-docs] Add documentation for `vcpkg_configure_meson()`, `vcpkg_install_meson()`, `vcpkg_fixup_cmake_targts()`, and `vcpkg_prettify_command()` (#7606)
* [vcpkg-docs] Add documentation for `vcpkg_configure_meson()`, `vcpkg_install_meson()`, `vcpkg_fixup_cmake_targts()`, and `vcpkg_prettify_command()`
* [docs] Address code review comments. Reformat docs for vcpkg_fail_port_install.
Diffstat (limited to 'scripts/cmake/vcpkg_fixup_cmake_targets.cmake')
| -rw-r--r-- | scripts/cmake/vcpkg_fixup_cmake_targets.cmake | 60 |
1 files changed, 39 insertions, 21 deletions
diff --git a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake index d72381be5..b2faa4abe 100644 --- a/scripts/cmake/vcpkg_fixup_cmake_targets.cmake +++ b/scripts/cmake/vcpkg_fixup_cmake_targets.cmake @@ -1,24 +1,42 @@ -#.rst: -# .. command:: vcpkg_fixup_cmake_targets -# -# Transforms all /debug/share/<port>/*targets-debug.cmake files and move them to /share/<port>. -# Removes all /debug/share/<port>/*targets.cmake and /debug/share/<port>/*config.cmake -# -# Transforms all references matching /bin/*.exe to /tools/<port>/*.exe on Windows -# Transforms all references matching /bin/* to /tools/<port>/* on other platforms -# -# Fixes ${_IMPORT_PREFIX} in auto generated targets to be one folder deeper. -# Replaces ${CURRENT_INSTALLED_DIR} with ${_IMPORT_PREFIX} in configs/targets. -# -# :: -# vcpkg_fixup_cmake_targets([CONFIG_PATH <config_path>]) -# -# ``CONFIG_PATH`` -# *.cmake files subdirectory (like "lib/cmake/${PORT}"). -# -# Example usage: -# vcpkg_fixup_cmake_targets(CONFIG_PATH "lib/cmake/myPort") - +## # vcpkg_fixup_cmake_targets +## +## Merge release and debug CMake targets and configs to support multiconfig generators. +## +## Additionally corrects common issues with targets, such as absolute paths and incorrectly placed binaries. +## +## ## Usage +## ```cmake +## vcpkg_fixup_cmake_targets([CONFIG_PATH <share/${PORT}>] [TARGET_PATH <share/${PORT}>]) +## ``` +## +## ## Parameters +## +## ### CONFIG_PATH +## Subpath currently containing `*.cmake` files subdirectory (like `lib/cmake/${PORT}`). Should be relative to `${CURRENT_PACKAGES_DIR}`. +## +## Defaults to `share/${PORT}`. +## +## ### TARGET_PATH +## Subpath to which the above `*.cmake` files should be moved. Should be relative to `${CURRENT_PACKAGES_DIR}`. +## This needs to be specified if the port name differs from the `find_package()` name. +## +## Defaults to `share/${PORT}`. +## +## ## Notes +## Transform all `/debug/<CONFIG_PATH>/*targets-debug.cmake` files and move them to `/<TARGET_PATH>`. +## Removes all `/debug/<CONFIG_PATH>/*targets.cmake` and `/debug/<CONFIG_PATH>/*config.cmake`. +## +## Transform all references matching `/bin/*.exe` to `/tools/<port>/*.exe` on Windows. +## Transform all references matching `/bin/*` to `/tools/<port>/*` on other platforms. +## +## Fix `${_IMPORT_PREFIX}` in auto generated targets to be one folder deeper. +## Replace `${CURRENT_INSTALLED_DIR}` with `${_IMPORT_PREFIX}` in configs and targets. +## +## ## Examples +## +## * [concurrentqueue](https://github.com/Microsoft/vcpkg/blob/master/ports/concurrentqueue/portfile.cmake) +## * [curl](https://github.com/Microsoft/vcpkg/blob/master/ports/curl/portfile.cmake) +## * [nlohmann-json](https://github.com/Microsoft/vcpkg/blob/master/ports/nlohmann-json/portfile.cmake) function(vcpkg_fixup_cmake_targets) cmake_parse_arguments(_vfct "" "CONFIG_PATH;TARGET_PATH" "" ${ARGN}) |
