From e3077aa4102e5e0254adac7a47b5c3e5f5a6b6f7 Mon Sep 17 00:00:00 2001 From: David Markowitz <39972741+EmosewaMC@users.noreply.github.com> Date: Thu, 1 Sep 2022 19:24:00 -0700 Subject: [PATCH] Fix Windows not working due to libbcrypt not working on Ninja (#765) --- thirdparty/CMakeLists.txt | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/thirdparty/CMakeLists.txt b/thirdparty/CMakeLists.txt index c7a27510..978c5532 100644 --- a/thirdparty/CMakeLists.txt +++ b/thirdparty/CMakeLists.txt @@ -6,13 +6,15 @@ set(tinyxml2_BUILD_TESTING OFF) # Source Code for tinyxml2 add_subdirectory(tinyxml2) -# Source Code for libbcrypt -# Disable warning about no project version. -set(CMAKE_POLICY_DEFAULT_CMP0048 NEW) -# Disable warning about the minimum version of cmake used for bcrypt being deprecated in the future -set(CMAKE_WARN_DEPRECATED OFF CACHE BOOL "" FORCE) - -add_subdirectory(libbcrypt) +# Source Code for libbcrypt. Uses a file glob instead to get around Windows build issues. +file( + GLOB SOURCES_LIBBCRYPT + LIST_DIRECTORIES false + RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" + ${CMAKE_CURRENT_SOURCE_DIR}/libbcrypt/*.c + ${CMAKE_CURRENT_SOURCE_DIR}/libbcrypt/src/*.c +) +add_library(bcrypt ${SOURCES_LIBBCRYPT}) # Source code for sqlite add_subdirectory(SQLite)