#===============================================================================
# Copyright 2019-2021 Intel Corporation
#
# 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.
#===============================================================================

#
# Intel® Integrated Performance Primitives Cryptography (Intel® IPP Cryptography)
#

if (UNIX)
  if (APPLE)
    set(CMAKE_ASM_NASM_OBJECT_FORMAT macho64)
  else()
    if (${ARCH} MATCHES "ia32")
      set(CMAKE_ASM_NASM_OBJECT_FORMAT elf32)
    else()
      set(CMAKE_ASM_NASM_OBJECT_FORMAT elf64)
    endif()
  endif()
else() # Windows
  if (${ARCH} MATCHES "ia32")
    set(CMAKE_ASM_NASM_OBJECT_FORMAT win32) # MS extended COFF for Win32
  else()
    set(CMAKE_ASM_NASM_OBJECT_FORMAT win64)
  endif()
endif()

set(CMAKE_ASM_NASM_COMPILE_OBJECT "<CMAKE_ASM_NASM_COMPILER> <INCLUDES> <FLAGS> <DEFINES> -f ${CMAKE_ASM_NASM_OBJECT_FORMAT} -o <OBJECT> <SOURCE>")
set(CMAKE_ASM_NASM_FLAGS_INIT "${LIBRARY_DEFINES}")
