set(VCPKG_TARGET_ARCHITECTURE x64)
set(VCPKG_CRT_LINKAGE static)
set(VCPKG_LIBRARY_LINKAGE static)
set(CMAKE_SYSTEM_PROCESSOR x86_64)

set(VCPKG_CMAKE_SYSTEM_NAME Linux)

set(HOST x86_64-multilib-linux-musl)
set(CROSS ${HOST}-)

set(CMAKE_C_COMPILER ${CROSS}gcc)
set(CMAKE_ASM_COMPILER ${CROSS}gcc)
set(CMAKE_CXX_COMPILER ${CROSS}g++)
set(CMAKE_Fortran_COMPILER ${CROSS}gfortran)
set(CMAKE_STRIP ${CROSS}strip CACHE FILEPATH "")
set(CMAKE_AR ${CROSS}ar CACHE FILEPATH "")
set(CMAKE_RANLIB ${CROSS}gcc-ranlib CACHE FILEPATH "")
set(CMAKE_OBJDUMP ${CROSS}objdump CACHE FILEPATH "")

set(LINKER_EXECUTABLE ld.gold CACHE FILEPATH "")
set(CMAKE_EXE_LINKER_FLAGS "-static -fuse-ld=gold ${VCPKG_LINKER_FLAGS}" CACHE STRING "")
set(CMAKE_SHARED_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS} CACHE STRING "")
set(CMAKE_MODULE_LINKER_FLAGS ${CMAKE_EXE_LINKER_FLAGS} CACHE STRING "")
set(CMAKE_SYSROOT /tools/toolchains/x86_64-multilib-linux-musl/x86_64-multilib-linux-musl/sysroot)

set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
