2017-02-23 08:38:43 -08:00
|
|
|
cmake_minimum_required(VERSION 3.2)
|
|
|
|
|
|
|
|
project(blake2)
|
|
|
|
|
|
|
|
set(BLAKE2_INCLUDE_DIR
|
|
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/src"
|
|
|
|
CACHE PATH "blake2 include path")
|
|
|
|
|
|
|
|
include_directories(
|
|
|
|
${LIBblake2_INCLUDE_DIRS}
|
|
|
|
src
|
|
|
|
)
|
|
|
|
|
|
|
|
if(WIN32)
|
|
|
|
if(MSVC)
|
2018-09-12 07:49:13 -07:00
|
|
|
add_compile_options($<IF:$<CONFIG:Debug>,/MTd,/MT> /Zl)
|
2017-02-23 08:38:43 -08:00
|
|
|
endif()
|
|
|
|
add_definitions(
|
|
|
|
-Dinline=_inline
|
|
|
|
-Drestrict=__restrict)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set(blake2_SOURCES
|
|
|
|
src/blake2b-ref.c)
|
|
|
|
|
|
|
|
set(blake2_HEADERS
|
|
|
|
src/blake2.h
|
|
|
|
src/blake2-impl.h)
|
|
|
|
|
|
|
|
add_library(blake2 STATIC
|
|
|
|
${blake2_SOURCES}
|
|
|
|
${blake2_HEADERS})
|
2020-05-13 06:37:01 -07:00
|
|
|
set_target_properties(blake2 PROPERTIES FOLDER "deps")
|