changeset 183:2f94b2046d7c

upgrade to openssl 1.1.1, fix build if using MinGW 32bits
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 15 Dec 2020 10:04:35 +0100
parents e01322c61094
children e8c3c92f2532
files MySQL/CMakeLists.txt MySQL/NEWS Resources/CMake/MariaDBConfiguration.cmake
diffstat 3 files changed, 18 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MySQL/CMakeLists.txt	Mon Dec 14 17:32:11 2020 +0100
+++ b/MySQL/CMakeLists.txt	Tue Dec 15 10:04:35 2020 +0100
@@ -18,7 +18,7 @@
 include(${CMAKE_SOURCE_DIR}/../Resources/CMake/DatabasesPluginParameters.cmake)
 
 set(ENABLE_MYSQL_BACKEND ON)
-set(OPENSSL_STATIC_VERSION "1.0.2" CACHE STRING "TODO - Upgrade to OpenSSL 1.1.1" FORCE)
+set(OPENSSL_STATIC_VERSION "1.1.1" CACHE STRING "Force the use of OpenSSL 1.1.1" FORCE)
   
 include(${CMAKE_SOURCE_DIR}/../Resources/CMake/DatabasesPluginConfiguration.cmake)
 
--- a/MySQL/NEWS	Mon Dec 14 17:32:11 2020 +0100
+++ b/MySQL/NEWS	Tue Dec 15 10:04:35 2020 +0100
@@ -13,6 +13,8 @@
   - "SslVerifyServerCertificates" (true by default - inactive if EnableSsl if false)
   - "SslCACertificates" (default value is "HttpsCACertificates" from global
     Orthanc configuration)
+* Upgraded dependencies for static builds (notably on Windows and LSB):
+  - openssl 1.1.1g
 
 
 Release 2.0 (2019-01-23)
--- a/Resources/CMake/MariaDBConfiguration.cmake	Mon Dec 14 17:32:11 2020 +0100
+++ b/Resources/CMake/MariaDBConfiguration.cmake	Tue Dec 15 10:04:35 2020 +0100
@@ -130,6 +130,21 @@
 
   if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
     link_libraries(shlwapi)
+
+    # MariaDB connector requires the fibers API (file "fibersapi.h",
+    # e.g. function "IsThreadAFiber()"), that was introduced in
+    # Windows Vista. This is done by redefining the "_WIN32_WINNT"
+    # macro that is initially set to 0x501 (Windows XP) in
+    # "OrthancFramework/Resources/CMake/Compiler.cmake".
+    # https://docs.microsoft.com/en-us/windows/win32/api/fibersapi/nf-fibersapi-isthreadafiber
+    remove_definitions(
+      -DWINVER=0x0501
+      -D_WIN32_WINNT=0x0501
+      )
+    add_definitions(
+      -DWINVER=0x0600
+      -D_WIN32_WINNT=0x0600
+      )
   endif()
 
 else()