Dont mess CROSS with CC/CXX/etc

Signed-off-by: Vasyl Gello <vasek.gello@gmail.com>
This commit is contained in:
Vasyl Gello 2023-11-09 12:41:06 +02:00
parent 35083724f6
commit 30a5041799

View File

@ -174,6 +174,7 @@ else()
set(ENV{AR} ${VCPKG_DETECTED_CMAKE_AR})
set(ENV{LD} ${VCPKG_DETECTED_CMAKE_LINKER})
set(ENV{RANLIB} ${VCPKG_DETECTED_CMAKE_RANLIB})
set(ENV{STRIP} ${VCPKG_DETECTED_CMAKE_STRIP})
if(VCPKG_TARGET_IS_MINGW)
if(LIBVPX_TARGET_ARCH STREQUAL "x86")
@ -186,6 +187,12 @@ else()
if(VCPKG_TARGET_ARCHITECTURE STREQUAL arm AND NOT VCPKG_DETECTED_CMAKE_HOST_SYSTEM_PROCESSOR STREQUAL arm)
message(STATUS "Cross-building for arm-linux with arm-linux-gnueabihf")
set(ENV{CROSS} "arm-linux-gnueabihf-")
unset(ENV{CC})
unset(ENV{CXX})
unset(ENV{AR})
unset(ENV{LD})
unset(ENV{RANLIB})
unset(ENV{STRIP})
endif()
elseif(VCPKG_TARGET_IS_ANDROID)
set(LIBVPX_TARGET "generic-gnu")