mirror of
https://github.com/microsoft/vcpkg
synced 2024-11-21 16:09:03 -07:00
Don't unset CMAKE_CROSSCOMPILING when cross-compiling to linux (#37734)
This commit is contained in:
parent
4de4372b5b
commit
3f530d4827
1 changed files with 4 additions and 3 deletions
|
@ -21,9 +21,6 @@ if(NOT _VCPKG_LINUX_TOOLCHAIN)
|
|||
VCPKG_LINKER_FLAGS VCPKG_LINKER_FLAGS_RELEASE VCPKG_LINKER_FLAGS_DEBUG
|
||||
)
|
||||
|
||||
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux")
|
||||
set(CMAKE_CROSSCOMPILING OFF CACHE BOOL "")
|
||||
endif()
|
||||
set(CMAKE_SYSTEM_NAME Linux CACHE STRING "")
|
||||
if(VCPKG_TARGET_ARCHITECTURE STREQUAL "x64")
|
||||
set(CMAKE_SYSTEM_PROCESSOR x86_64 CACHE STRING "")
|
||||
|
@ -70,6 +67,10 @@ if(NOT _VCPKG_LINUX_TOOLCHAIN)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
if(CMAKE_HOST_SYSTEM_NAME STREQUAL "Linux" AND CMAKE_SYSTEM_PROCESSOR STREQUAL CMAKE_HOST_SYSTEM_PROCESSOR)
|
||||
set(CMAKE_CROSSCOMPILING OFF CACHE BOOL "")
|
||||
endif()
|
||||
|
||||
string(APPEND CMAKE_C_FLAGS_INIT " -fPIC ${VCPKG_C_FLAGS} ")
|
||||
string(APPEND CMAKE_CXX_FLAGS_INIT " -fPIC ${VCPKG_CXX_FLAGS} ")
|
||||
string(APPEND CMAKE_C_FLAGS_DEBUG_INIT " ${VCPKG_C_FLAGS_DEBUG} ")
|
||||
|
|
Loading…
Reference in a new issue