--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -111,7 +111,6 @@
    -O3                            # Optimize for speed
    -Wall                          # Enable most warning messages
    -Wextra                        # Enable additional warning messages
-   -fuse-linker-plugin            # Use LTO plugin
    -ftree-vectorize               # Enable loop vectorization
    -fno-fast-math                 # Standard-compliant floating point math
    -fno-unsafe-math-optimizations # Use safe math only
--- a/app/CMakeLists.txt
+++ b/app/CMakeLists.txt
@@ -244,7 +244,7 @@
 #-------------------------------------------------------------------------------
 
 if(WIN32)
- target_link_libraries(${PROJECT_EXECUTABLE} PRIVATE Dwmapi.lib)
+ target_link_libraries(${PROJECT_EXECUTABLE} PRIVATE dwmapi)
  set_target_properties(
   ${PROJECT_EXECUTABLE} PROPERTIES
   WIN32_EXECUTABLE TRUE
@@ -289,6 +289,7 @@
  set(deploy_tool_options_arg --no-compiler-runtime -force-openssl --release)
 endif()
 
+if(DEPLOY_APP)
 qt_generate_deploy_qml_app_script(
  TARGET ${PROJECT_EXECUTABLE}
  OUTPUT_SCRIPT deploy_script
@@ -299,6 +300,7 @@
 )
 
 install(SCRIPT ${deploy_script})
+endif()
 
 #-------------------------------------------------------------------------------
 # Packaging
--- a/lib/OpenSSL/CMakeLists.txt
+++ b/lib/OpenSSL/CMakeLists.txt
@@ -23,7 +23,7 @@
 cmake_minimum_required(VERSION 3.20)
 
 function(target_link_openssl TARGET BASE_DIR)
- if(WIN32)
+ if(MSVC)
   target_include_directories(${TARGET} PRIVATE ${BASE_DIR}/include)
   target_link_libraries(${TARGET} PRIVATE
    ws2_32
@@ -40,7 +40,7 @@
   ${BASE_DIR}/dll/macOS/libssl.a
   ${BASE_DIR}/dll/macOS/libcrypto.a
  )
-elseif(UNIX)
+elseif(UNIX OR MINGW)
  find_package(PkgConfig REQUIRED)
  pkg_check_modules(OPENSSL REQUIRED openssl)
  target_link_libraries(${TARGET} PRIVATE ${OPENSSL_LIBRARIES})
