# SPDX-License-Identifier: MIT

# This file was generated by
# scripts/copy_from_upstream/copy_from_upstream.py

set(_DILITHIUM_OBJS "")

if(OQS_ENABLE_SIG_dilithium_2)
    add_library(dilithium_2_ref OBJECT sig_dilithium_2.c pqcrystals-dilithium_dilithium2_ref/ntt.c pqcrystals-dilithium_dilithium2_ref/packing.c pqcrystals-dilithium_dilithium2_ref/poly.c pqcrystals-dilithium_dilithium2_ref/polyvec.c pqcrystals-dilithium_dilithium2_ref/reduce.c pqcrystals-dilithium_dilithium2_ref/rounding.c pqcrystals-dilithium_dilithium2_ref/sign.c pqcrystals-dilithium_dilithium2_ref/symmetric-shake.c)
    target_compile_options(dilithium_2_ref PUBLIC -DDILITHIUM_MODE=2 -DDILITHIUM_RANDOMIZED_SIGNING)
    target_include_directories(dilithium_2_ref PRIVATE ${CMAKE_CURRENT_LIST_DIR}/pqcrystals-dilithium_dilithium2_ref)
    target_include_directories(dilithium_2_ref PRIVATE ${PROJECT_SOURCE_DIR}/src/common/pqclean_shims)
    target_compile_options(dilithium_2_ref PUBLIC -DDILITHIUM_MODE=2 -DDILITHIUM_RANDOMIZED_SIGNING)
    set(_DILITHIUM_OBJS ${_DILITHIUM_OBJS} $<TARGET_OBJECTS:dilithium_2_ref>)
endif()

if(OQS_ENABLE_SIG_dilithium_2_avx2)
    add_library(dilithium_2_avx2 OBJECT pqcrystals-dilithium_dilithium2_avx2/consts.c pqcrystals-dilithium_dilithium2_avx2/invntt.S pqcrystals-dilithium_dilithium2_avx2/ntt.S pqcrystals-dilithium_dilithium2_avx2/packing.c pqcrystals-dilithium_dilithium2_avx2/pointwise.S pqcrystals-dilithium_dilithium2_avx2/poly.c pqcrystals-dilithium_dilithium2_avx2/polyvec.c pqcrystals-dilithium_dilithium2_avx2/rejsample.c pqcrystals-dilithium_dilithium2_avx2/rounding.c pqcrystals-dilithium_dilithium2_avx2/shuffle.S pqcrystals-dilithium_dilithium2_avx2/sign.c pqcrystals-dilithium_dilithium2_avx2/symmetric-shake.c)
    target_include_directories(dilithium_2_avx2 PRIVATE ${CMAKE_CURRENT_LIST_DIR}/pqcrystals-dilithium_dilithium2_avx2)
    target_include_directories(dilithium_2_avx2 PRIVATE ${PROJECT_SOURCE_DIR}/src/common/pqclean_shims)
    target_compile_options(dilithium_2_avx2 PRIVATE -mavx2 -mpopcnt)
    target_compile_options(dilithium_2_avx2 PUBLIC -DDILITHIUM_MODE=2 -DDILITHIUM_RANDOMIZED_SIGNING)
    set(_DILITHIUM_OBJS ${_DILITHIUM_OBJS} $<TARGET_OBJECTS:dilithium_2_avx2>)
endif()

if(OQS_ENABLE_SIG_dilithium_2_aarch64)
    add_library(dilithium_2_aarch64 OBJECT oldpqclean_dilithium2_aarch64/__asm_iNTT.S oldpqclean_dilithium2_aarch64/__asm_NTT.S oldpqclean_dilithium2_aarch64/__asm_poly.S oldpqclean_dilithium2_aarch64/feat.S oldpqclean_dilithium2_aarch64/fips202x2.c oldpqclean_dilithium2_aarch64/ntt.c oldpqclean_dilithium2_aarch64/packing.c oldpqclean_dilithium2_aarch64/poly.c oldpqclean_dilithium2_aarch64/polyvec.c oldpqclean_dilithium2_aarch64/reduce.c oldpqclean_dilithium2_aarch64/rounding.c oldpqclean_dilithium2_aarch64/sign.c oldpqclean_dilithium2_aarch64/symmetric-shake.c)
    target_include_directories(dilithium_2_aarch64 PRIVATE ${CMAKE_CURRENT_LIST_DIR}/oldpqclean_dilithium2_aarch64)
    target_include_directories(dilithium_2_aarch64 PRIVATE ${PROJECT_SOURCE_DIR}/src/common/pqclean_shims)
    target_compile_options(dilithium_2_aarch64 PRIVATE)
    set(_DILITHIUM_OBJS ${_DILITHIUM_OBJS} $<TARGET_OBJECTS:dilithium_2_aarch64>)
endif()

if(OQS_ENABLE_SIG_dilithium_3)
    add_library(dilithium_3_ref OBJECT sig_dilithium_3.c pqcrystals-dilithium_dilithium3_ref/ntt.c pqcrystals-dilithium_dilithium3_ref/packing.c pqcrystals-dilithium_dilithium3_ref/poly.c pqcrystals-dilithium_dilithium3_ref/polyvec.c pqcrystals-dilithium_dilithium3_ref/reduce.c pqcrystals-dilithium_dilithium3_ref/rounding.c pqcrystals-dilithium_dilithium3_ref/sign.c pqcrystals-dilithium_dilithium3_ref/symmetric-shake.c)
    target_compile_options(dilithium_3_ref PUBLIC -DDILITHIUM_MODE=3 -DDILITHIUM_RANDOMIZED_SIGNING)
    target_include_directories(dilithium_3_ref PRIVATE ${CMAKE_CURRENT_LIST_DIR}/pqcrystals-dilithium_dilithium3_ref)
    target_include_directories(dilithium_3_ref PRIVATE ${PROJECT_SOURCE_DIR}/src/common/pqclean_shims)
    target_compile_options(dilithium_3_ref PUBLIC -DDILITHIUM_MODE=3 -DDILITHIUM_RANDOMIZED_SIGNING)
    set(_DILITHIUM_OBJS ${_DILITHIUM_OBJS} $<TARGET_OBJECTS:dilithium_3_ref>)
endif()

if(OQS_ENABLE_SIG_dilithium_3_avx2)
    add_library(dilithium_3_avx2 OBJECT pqcrystals-dilithium_dilithium3_avx2/consts.c pqcrystals-dilithium_dilithium3_avx2/invntt.S pqcrystals-dilithium_dilithium3_avx2/ntt.S pqcrystals-dilithium_dilithium3_avx2/packing.c pqcrystals-dilithium_dilithium3_avx2/pointwise.S pqcrystals-dilithium_dilithium3_avx2/poly.c pqcrystals-dilithium_dilithium3_avx2/polyvec.c pqcrystals-dilithium_dilithium3_avx2/rejsample.c pqcrystals-dilithium_dilithium3_avx2/rounding.c pqcrystals-dilithium_dilithium3_avx2/shuffle.S pqcrystals-dilithium_dilithium3_avx2/sign.c pqcrystals-dilithium_dilithium3_avx2/symmetric-shake.c)
    target_include_directories(dilithium_3_avx2 PRIVATE ${CMAKE_CURRENT_LIST_DIR}/pqcrystals-dilithium_dilithium3_avx2)
    target_include_directories(dilithium_3_avx2 PRIVATE ${PROJECT_SOURCE_DIR}/src/common/pqclean_shims)
    target_compile_options(dilithium_3_avx2 PRIVATE -mavx2 -mpopcnt)
    target_compile_options(dilithium_3_avx2 PUBLIC -DDILITHIUM_MODE=3 -DDILITHIUM_RANDOMIZED_SIGNING)
    set(_DILITHIUM_OBJS ${_DILITHIUM_OBJS} $<TARGET_OBJECTS:dilithium_3_avx2>)
endif()

if(OQS_ENABLE_SIG_dilithium_3_aarch64)
    add_library(dilithium_3_aarch64 OBJECT oldpqclean_dilithium3_aarch64/__asm_iNTT.S oldpqclean_dilithium3_aarch64/__asm_NTT.S oldpqclean_dilithium3_aarch64/__asm_poly.S oldpqclean_dilithium3_aarch64/feat.S oldpqclean_dilithium3_aarch64/fips202x2.c oldpqclean_dilithium3_aarch64/ntt.c oldpqclean_dilithium3_aarch64/packing.c oldpqclean_dilithium3_aarch64/poly.c oldpqclean_dilithium3_aarch64/polyvec.c oldpqclean_dilithium3_aarch64/reduce.c oldpqclean_dilithium3_aarch64/rounding.c oldpqclean_dilithium3_aarch64/sign.c oldpqclean_dilithium3_aarch64/symmetric-shake.c)
    target_include_directories(dilithium_3_aarch64 PRIVATE ${CMAKE_CURRENT_LIST_DIR}/oldpqclean_dilithium3_aarch64)
    target_include_directories(dilithium_3_aarch64 PRIVATE ${PROJECT_SOURCE_DIR}/src/common/pqclean_shims)
    target_compile_options(dilithium_3_aarch64 PRIVATE)
    set(_DILITHIUM_OBJS ${_DILITHIUM_OBJS} $<TARGET_OBJECTS:dilithium_3_aarch64>)
endif()

if(OQS_ENABLE_SIG_dilithium_5)
    add_library(dilithium_5_ref OBJECT sig_dilithium_5.c pqcrystals-dilithium_dilithium5_ref/ntt.c pqcrystals-dilithium_dilithium5_ref/packing.c pqcrystals-dilithium_dilithium5_ref/poly.c pqcrystals-dilithium_dilithium5_ref/polyvec.c pqcrystals-dilithium_dilithium5_ref/reduce.c pqcrystals-dilithium_dilithium5_ref/rounding.c pqcrystals-dilithium_dilithium5_ref/sign.c pqcrystals-dilithium_dilithium5_ref/symmetric-shake.c)
    target_compile_options(dilithium_5_ref PUBLIC -DDILITHIUM_MODE=5 -DDILITHIUM_RANDOMIZED_SIGNING)
    target_include_directories(dilithium_5_ref PRIVATE ${CMAKE_CURRENT_LIST_DIR}/pqcrystals-dilithium_dilithium5_ref)
    target_include_directories(dilithium_5_ref PRIVATE ${PROJECT_SOURCE_DIR}/src/common/pqclean_shims)
    target_compile_options(dilithium_5_ref PUBLIC -DDILITHIUM_MODE=5 -DDILITHIUM_RANDOMIZED_SIGNING)
    set(_DILITHIUM_OBJS ${_DILITHIUM_OBJS} $<TARGET_OBJECTS:dilithium_5_ref>)
endif()

if(OQS_ENABLE_SIG_dilithium_5_avx2)
    add_library(dilithium_5_avx2 OBJECT pqcrystals-dilithium_dilithium5_avx2/consts.c pqcrystals-dilithium_dilithium5_avx2/invntt.S pqcrystals-dilithium_dilithium5_avx2/ntt.S pqcrystals-dilithium_dilithium5_avx2/packing.c pqcrystals-dilithium_dilithium5_avx2/pointwise.S pqcrystals-dilithium_dilithium5_avx2/poly.c pqcrystals-dilithium_dilithium5_avx2/polyvec.c pqcrystals-dilithium_dilithium5_avx2/rejsample.c pqcrystals-dilithium_dilithium5_avx2/rounding.c pqcrystals-dilithium_dilithium5_avx2/shuffle.S pqcrystals-dilithium_dilithium5_avx2/sign.c pqcrystals-dilithium_dilithium5_avx2/symmetric-shake.c)
    target_include_directories(dilithium_5_avx2 PRIVATE ${CMAKE_CURRENT_LIST_DIR}/pqcrystals-dilithium_dilithium5_avx2)
    target_include_directories(dilithium_5_avx2 PRIVATE ${PROJECT_SOURCE_DIR}/src/common/pqclean_shims)
    target_compile_options(dilithium_5_avx2 PRIVATE -mavx2 -mpopcnt)
    target_compile_options(dilithium_5_avx2 PUBLIC -DDILITHIUM_MODE=5 -DDILITHIUM_RANDOMIZED_SIGNING)
    set(_DILITHIUM_OBJS ${_DILITHIUM_OBJS} $<TARGET_OBJECTS:dilithium_5_avx2>)
endif()

if(OQS_ENABLE_SIG_dilithium_5_aarch64)
    add_library(dilithium_5_aarch64 OBJECT oldpqclean_dilithium5_aarch64/__asm_iNTT.S oldpqclean_dilithium5_aarch64/__asm_NTT.S oldpqclean_dilithium5_aarch64/__asm_poly.S oldpqclean_dilithium5_aarch64/feat.S oldpqclean_dilithium5_aarch64/fips202x2.c oldpqclean_dilithium5_aarch64/ntt.c oldpqclean_dilithium5_aarch64/packing.c oldpqclean_dilithium5_aarch64/poly.c oldpqclean_dilithium5_aarch64/polyvec.c oldpqclean_dilithium5_aarch64/reduce.c oldpqclean_dilithium5_aarch64/rounding.c oldpqclean_dilithium5_aarch64/sign.c oldpqclean_dilithium5_aarch64/symmetric-shake.c)
    target_include_directories(dilithium_5_aarch64 PRIVATE ${CMAKE_CURRENT_LIST_DIR}/oldpqclean_dilithium5_aarch64)
    target_include_directories(dilithium_5_aarch64 PRIVATE ${PROJECT_SOURCE_DIR}/src/common/pqclean_shims)
    target_compile_options(dilithium_5_aarch64 PRIVATE)
    set(_DILITHIUM_OBJS ${_DILITHIUM_OBJS} $<TARGET_OBJECTS:dilithium_5_aarch64>)
endif()

set(DILITHIUM_OBJS ${_DILITHIUM_OBJS} PARENT_SCOPE)
