diff options
| author | Alexander Neumann <30894796+Neumann-A@users.noreply.github.com> | 2021-04-02 21:51:05 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-04-02 12:51:05 -0700 |
| commit | 42c437bb33261a2da5e1471195cc6a231af099f3 (patch) | |
| tree | 2f234d2ac2de1aa979d43a959d03ed437b132721 /scripts | |
| parent | db0ec30af6eb8d548a324ec7ab31b8467d85464e (diff) | |
| download | vcpkg-42c437bb33261a2da5e1471195cc6a231af099f3.tar.gz vcpkg-42c437bb33261a2da5e1471195cc6a231af099f3.zip | |
[vcpkg/scripts] add variable VCPKG_CROSSCOMPILING (#16900)
* add VCPKG_CROSSCOMPILING
* update docs
* Apply suggestions from code review
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
* update docs
Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/cmake/vcpkg_common_definitions.cmake | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/cmake/vcpkg_common_definitions.cmake b/scripts/cmake/vcpkg_common_definitions.cmake index b505f3693..6d2b6df5b 100644 --- a/scripts/cmake/vcpkg_common_definitions.cmake +++ b/scripts/cmake/vcpkg_common_definitions.cmake @@ -22,6 +22,7 @@ TARGET_TRIPLET the name of the current triplet to buil CURRENT_INSTALLED_DIR the absolute path to the installed files for the current triplet HOST_TRIPLET the name of the triplet corresponding to the host CURRENT_HOST_INSTALLED_DIR the absolute path to the installed files for the host triplet +VCPKG_CROSSCOMPILING Whether vcpkg is cross-compiling: in other words, whether TARGET_TRIPLET and HOST_TRIPLET are different ``` CMAKE_STATIC_LIBRARY_(PREFIX|SUFFIX), CMAKE_SHARED_LIBRARY_(PREFIX|SUFFIX) and CMAKE_IMPORT_LIBRARY_(PREFIX|SUFFIX) are defined for the target @@ -29,6 +30,7 @@ Furthermore the variables CMAKE_FIND_LIBRARY_(PREFIXES|SUFFIXES) are also define portfiles are able to use find_library calls to discover dependent libraries within the current triplet for ports. #]===] +string(COMPARE EQUAL "${TARGET_TRIPLET}" "${HOST_TRIPLET}" VCPKG_CROSSCOMPILING) #Helper variable to identify the Target system. VCPKG_TARGET_IS_<targetname> if (NOT DEFINED VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "") set(VCPKG_TARGET_IS_WINDOWS ON) |
