From 2404d71d8bbefce88e74d638c44f21dfe04ff7a5 Mon Sep 17 00:00:00 2001 From: akallabeth Date: Thu, 14 Nov 2024 20:15:02 +0100 Subject: [PATCH] xx --- CMakeLists.txt | 9 +--- libfreerdp/core/test/TestSettings.c | 1 + winpr/CMakeLists.txt | 73 ++++++++++++++--------------- winpr/include/winpr/user.h | 4 +- 4 files changed, 40 insertions(+), 47 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 93c3afcd3..f91453b18 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -502,13 +502,8 @@ endif() 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() + enable_testing() + set(TESTING_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/Testing") endif() include(CommonConfigOptions) diff --git a/libfreerdp/core/test/TestSettings.c b/libfreerdp/core/test/TestSettings.c index 5dc9b2467..128e0958f 100644 --- a/libfreerdp/core/test/TestSettings.c +++ b/libfreerdp/core/test/TestSettings.c @@ -1,5 +1,6 @@ #include +#include #include #include diff --git a/winpr/CMakeLists.txt b/winpr/CMakeLists.txt index 2fed1f88e..aadddc3e5 100644 --- a/winpr/CMakeLists.txt +++ b/winpr/CMakeLists.txt @@ -275,49 +275,44 @@ 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) - find_package(LibreSSL REQUIRED) - set(OPENSSL_INCLUDE_DIR ${LIBRESSL_INCLUDE_DIR}) - set(OPENSSL_LIBRARIES ${LIBRESSL_LIBRARIES}) - set(OPENSSL_CRYPTO_LIBRARIES ${LIBRESSL_LIBRARIES}) - set(WITH_OPENSSL ON) - set(OPENSSL_FOUND ON) - add_compile_definitions("WITH_LIBRESSL") - add_compile_definitions("WITH_OPENSSL") - 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") +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}) + set(OPENSSL_CRYPTO_LIBRARIES ${LIBRESSL_LIBRARIES}) + set(WITH_OPENSSL ON) + set(OPENSSL_FOUND ON) + add_compile_definitions("WITH_LIBRESSL") + add_compile_definitions("WITH_OPENSSL") +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() +set(TESTING_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/Testing") + if (NOT WIN32 AND NOT IOS AND NOT ANDROID) set(PKCS11_DEFAULT ON) else() diff --git a/winpr/include/winpr/user.h b/winpr/include/winpr/user.h index d819f43f0..b85a81582 100644 --- a/winpr/include/winpr/user.h +++ b/winpr/include/winpr/user.h @@ -27,7 +27,9 @@ * Standard Clipboard Formats */ -#ifndef _WIN32 +#ifdef _WIN32 +#include +#else #define MB_OK 0x00000000L #define MB_OKCANCEL 0x00000001L