mirror of
https://github.com/stasenso/sha256_c_client.git
synced 2026-06-26 21:32:42 +03:00
25 lines
623 B
CMake
25 lines
623 B
CMake
cmake_minimum_required(VERSION 3.20)
|
|
project(sha256_client_c LANGUAGES C)
|
|
|
|
if(NOT WIN32)
|
|
message(FATAL_ERROR "This sample is intended for Win64 (DLL import).")
|
|
endif()
|
|
|
|
add_executable(sha256_client
|
|
src/main.c
|
|
)
|
|
|
|
target_include_directories(sha256_client PRIVATE
|
|
${CMAKE_CURRENT_SOURCE_DIR}/include
|
|
)
|
|
|
|
target_link_libraries(sha256_client PRIVATE
|
|
${CMAKE_CURRENT_SOURCE_DIR}/dll/sha-256.lib
|
|
)
|
|
|
|
add_custom_command(TARGET sha256_client POST_BUILD
|
|
COMMAND ${CMAKE_COMMAND} -E copy_if_different
|
|
${CMAKE_CURRENT_SOURCE_DIR}/dll/sha-256.dll
|
|
$<TARGET_FILE_DIR:sha256_client>/sha-256.dll
|
|
)
|