Currently TARGET_OS was always forced to be HOST_OS.
It have not been an issue since all OS we handle was linux, so far.
For the future, we should TARGET_OS is set to HOST_OS only if it is not given.
set(TARGET_ARCH "${HOST_ARCH}")
endif()
+if(NOT DEFINED TARGET_OS)
+ set(TARGET_OS "${HOST_OS}")
+endif()
+
if("${HOST_ARCH}" STREQUAL "x86_64")
set(HOST_ARCH_BASE ${HOST_ARCH})
elseif("${HOST_ARCH}" STREQUAL "armv7l")
set(BUILD_IS_NATIVE False)
endif()
-set(TARGET_OS ${HOST_OS})
-
# host & target platform name
set(HOST_PLATFORM "${HOST_ARCH}-${HOST_OS}")
set(TARGET_PLATFORM "${TARGET_ARCH}-${TARGET_OS}")