mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-06-07 08:22:49 +08:00
[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>
This commit is contained in:
parent
db0ec30af6
commit
42c437bb33
@ -23,6 +23,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
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user