#
# SPDX-FileCopyrightText: Copyright (c) 1993-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

set(CMAKE_SYSTEM_NAME WindowsStore)
set(CMAKE_SYSTEM_VERSION 10.0)

set(CMAKE_C_COMPILER ${CC})
set(CMAKE_CXX_COMPILER ${CC})

if(DEFINED CUDA_TOOLKIT)
  set(CUDAToolkit_ROOT ${CUDA_TOOLKIT})
endif()

set(CMAKE_CUDA_COMPILER ${CUDAToolkit_ROOT}\\bin\\nvcc.exe)

set(CMAKE_C_COMPILER_FORCED TRUE)
set(CMAKE_CXX_COMPILER_FORCED TRUE)
set(CMAKE_CUDA_COMPILER_FORCED TRUE)

set(NV_TOOLS ${NV_TOOLS})
set(W10_LIBRARY_SUFFIXES .lib .dll)
set(W10_LINKER ${MSVC_COMPILER_DIR}\\bin\\amd64\\link)

set(CMAKE_CUDA_HOST_COMPILER ${CMAKE_NVCC_COMPILER} CACHE STRING "" FORCE)

set(ADDITIONAL_PLATFORM_INCL_FLAGS "-I${MSVC_COMPILER_DIR}\\include -I${MSVC_COMPILER_DIR}\\..\\ucrt\\include")
set(ADDITIONAL_PLATFORM_LIB_FLAGS ${ADDITIONAL_PLATFORM_LIB_FLAGS} "-LIBPATH:${NV_TOOLS}\\ddk\\wddmv2\\official\\17134\\Lib\\10.0.17134.0\\um\\x64")
set(ADDITIONAL_PLATFORM_LIB_FLAGS ${ADDITIONAL_PLATFORM_LIB_FLAGS} "-LIBPATH:${MSVC_COMPILER_DIR}\\lib\\amd64" )
set(ADDITIONAL_PLATFORM_LIB_FLAGS ${ADDITIONAL_PLATFORM_LIB_FLAGS} "-LIBPATH:${MSVC_COMPILER_DIR}\\..\\ucrt\\lib\\x64")
set(ADDITIONAL_PLATFORM_LIB_FLAGS ${ADDITIONAL_PLATFORM_LIB_FLAGS} "-LIBPATH:${CUDAToolkit_ROOT}\\lib\\x64 cudart.lib")

set(TRT_PLATFORM_ID "win10")
