This commit is contained in:
akallabeth 2024-11-14 20:15:02 +01:00
parent 4a2d0f96e3
commit 2404d71d8b
4 changed files with 40 additions and 47 deletions

View File

@ -503,12 +503,7 @@ include(CTest)
if(BUILD_TESTING_INTERNAL OR BUILD_TESTING)
enable_testing()
if(MSVC)
set(TESTING_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}")
else()
set(TESTING_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/Testing")
endif()
endif()
include(CommonConfigOptions)

View File

@ -1,5 +1,6 @@
#include <stdio.h>
#include <winpr/user.h>
#include <winpr/crypto.h>
#include <freerdp/settings.h>

View File

@ -275,16 +275,16 @@ if(NOT WIN32 AND NOT IOS)
list(REMOVE_ITEM CMAKE_REQUIRED_LIBRARIES pthread)
endif()
set(OPENSSL_FEATURE_TYPE "RECOMMENDED")
set(OPENSSL_FEATURE_PURPOSE "cryptography")
set(OPENSSL_FEATURE_DESCRIPTION "encryption, certificate validation, hashing functions")
set(OPENSSL_FEATURE_TYPE "RECOMMENDED")
set(OPENSSL_FEATURE_PURPOSE "cryptography")
set(OPENSSL_FEATURE_DESCRIPTION "encryption, certificate validation, hashing functions")
set(MBEDTLS_FEATURE_TYPE "OPTIONAL")
set(MBEDTLS_FEATURE_PURPOSE "cryptography")
set(MBEDTLS_FEATURE_DESCRIPTION "encryption, certificate validation, hashing functions")
set(MBEDTLS_FEATURE_TYPE "OPTIONAL")
set(MBEDTLS_FEATURE_PURPOSE "cryptography")
set(MBEDTLS_FEATURE_DESCRIPTION "encryption, certificate validation, hashing functions")
option(WITH_LIBRESSL "build with LibreSSL" OFF)
if (WITH_LIBRESSL)
option(WITH_LIBRESSL "build with LibreSSL" OFF)
if (WITH_LIBRESSL)
find_package(LibreSSL REQUIRED)
set(OPENSSL_INCLUDE_DIR ${LIBRESSL_INCLUDE_DIR})
set(OPENSSL_LIBRARIES ${LIBRESSL_LIBRARIES})
@ -293,31 +293,26 @@ endif()
set(OPENSSL_FOUND ON)
add_compile_definitions("WITH_LIBRESSL")
add_compile_definitions("WITH_OPENSSL")
else()
else()
find_feature(OpenSSL ${OPENSSL_FEATURE_TYPE} ${OPENSSL_FEATURE_PURPOSE} ${OPENSSL_FEATURE_DESCRIPTION})
find_feature(MbedTLS ${MBEDTLS_FEATURE_TYPE} ${MBEDTLS_FEATURE_PURPOSE} ${MBEDTLS_FEATURE_DESCRIPTION})
endif()
if (NOT OPENSSL_FOUND AND NOT MBEDTLS_FOUND AND NOT LibreSSL_FOUND)
message(FATAL_ERROR "OpenSSL or MBedTLS are required, none enabled/found")
endif()
if(WITH_OPENSSL AND OPENSSL_FOUND)
add_compile_definitions("WITH_OPENSSL")
endif()
if(WITH_MBEDTLS AND MBEDTLS_FOUND)
add_compile_definitions("WITH_MBEDTLS")
endif()
enable_testing()
if(MSVC)
set(TESTING_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}")
else()
set(TESTING_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/Testing")
endif()
if (NOT OPENSSL_FOUND AND NOT MBEDTLS_FOUND AND NOT LibreSSL_FOUND)
message(FATAL_ERROR "OpenSSL or MBedTLS are required, none enabled/found")
endif()
if(WITH_OPENSSL AND OPENSSL_FOUND)
add_compile_definitions("WITH_OPENSSL")
endif()
if(WITH_MBEDTLS AND MBEDTLS_FOUND)
add_compile_definitions("WITH_MBEDTLS")
endif()
enable_testing()
set(TESTING_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/Testing")
if (NOT WIN32 AND NOT IOS AND NOT ANDROID)
set(PKCS11_DEFAULT ON)
else()

View File

@ -27,7 +27,9 @@
* Standard Clipboard Formats
*/
#ifndef _WIN32
#ifdef _WIN32
#include <winuser.h>
#else
#define MB_OK 0x00000000L
#define MB_OKCANCEL 0x00000001L