1
1
mirror of https://github.com/henrydcase/pqc.git synced 2024-11-23 07:59:01 +00:00
pqcrypto/.cmake/common.mk

31 lines
732 B
Makefile
Raw Normal View History

2021-03-03 06:50:25 +00:00
# Common function for defining algorithm component
2021-03-24 10:25:45 +00:00
function(define_crypto_alg name namespace src inc)
get_property(OBJ_LIBS GLOBAL PROPERTY obj_libs)
set_property(GLOBAL PROPERTY obj_libs ${OBJ_LIBS} pqclean_${name})
2021-03-03 06:50:25 +00:00
add_library(
pqclean_${name}
OBJECT
${src}
)
target_include_directories(
pqclean_${name} PRIVATE
src/common
${inc}
)
target_compile_definitions(
pqclean_${name} PRIVATE
-DPQCLEAN_NAMESPACE=${namespace}
)
endfunction()
function(define_kem_alg name namespace src inc)
2021-03-24 10:25:45 +00:00
define_crypto_alg(${name} ${namespace} "${src}" "${inc}")
2021-03-03 06:50:25 +00:00
endfunction()
function(define_sig_alg name namespace src inc)
2021-03-24 10:25:45 +00:00
define_crypto_alg(${name} ${namespace} "${src}" "${inc}")
2021-03-03 06:50:25 +00:00
endfunction()