diff --git a/CMakeLists.txt b/CMakeLists.txt index 4adeae0..f780a1d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 3.18) cmake_policy(SET CMP0048 NEW) project(hdrbg LANGUAGES C VERSION 1.0.0 DESCRIPTION "C implementation of Hash DRBG") include(GNUInstallDirs) +message(${CMAKE_SYSTEM_NAME}) set(CMAKE_C_EXTENSIONS OFF) set(CMAKE_C_STANDARD 17) @@ -20,6 +21,10 @@ if(OPENSSL_FOUND) target_link_libraries(hdrbg PRIVATE ${OPENSSL_CRYPTO_LIBRARIES}) endif() +if(MINGW OR MSYS) + target_link_libraries(hdrbg PRIVATE -lbcrypt) +endif() + set_target_properties(hdrbg PROPERTIES PUBLIC_HEADER include/hdrbg.h SOVERSION 1