From c24b972325b54df738fc7780e5cf3151e303745a Mon Sep 17 00:00:00 2001 From: Paulchen Panther Date: Sat, 19 Dec 2020 11:39:57 +0100 Subject: [PATCH] Added libjpeg-turbo to dependencies --- cmake/Dependencies.cmake | 61 +++++++++++++++++++++++++++------------- 1 file changed, 42 insertions(+), 19 deletions(-) diff --git a/cmake/Dependencies.cmake b/cmake/Dependencies.cmake index caa92d83..95fea35c 100644 --- a/cmake/Dependencies.cmake +++ b/cmake/Dependencies.cmake @@ -234,7 +234,7 @@ macro(DeployWindows TARGET) list(REMOVE_AT DEPENDENCIES 0 1) endwhile() - # Copy OpenSSL Libs + # Copy libssl/libcrypto to 'hyperion' if (OPENSSL_FOUND) string(REGEX MATCHALL "[0-9]+" openssl_versions "${OPENSSL_VERSION}") list(GET openssl_versions 0 openssl_version_major) @@ -264,6 +264,27 @@ macro(DeployWindows TARGET) ) endif(OPENSSL_FOUND) + # Copy libjpeg-turbo to 'hyperion' + if (ENABLE_MF AND TURBOJPEG_FOUND) + find_file(TURBOJPEG_DLL + NAMES "turbojpeg.dll" + PATHS ${TurboJPEG_INCLUDE_DIRS}/.. ${TurboJPEG_INCLUDE_DIRS}/../bin + NO_DEFAULT_PATH + ) + + find_file(JPEG_DLL + NAMES "jpeg62.dll" + PATHS ${TurboJPEG_INCLUDE_DIRS}/.. ${TurboJPEG_INCLUDE_DIRS}/../bin + NO_DEFAULT_PATH + ) + + install( + FILES ${TURBOJPEG_DLL} ${JPEG_DLL} + DESTINATION "bin" + COMPONENT "Hyperion" + ) + endif() + # Create a qt.conf file in 'bin' to override hard-coded search paths in Qt plugins file(WRITE "${CMAKE_BINARY_DIR}/qt.conf" "[Paths]\nPlugins=../lib/\n") install( @@ -311,27 +332,29 @@ macro(DeployWindows TARGET) ) endforeach() - # Download DirectX End-User Runtimes (June 2010) - set(url "https://download.microsoft.com/download/8/4/A/84A35BF1-DAFE-4AE8-82AF-AD2AE20B6B14/directx_Jun2010_redist.exe") - if(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/dx_redist.exe") - file(DOWNLOAD "${url}" "${CMAKE_CURRENT_BINARY_DIR}/dx_redist.exe" - STATUS result - ) + if (ENABLE_DX) + # Download DirectX End-User Runtimes (June 2010) + set(url "https://download.microsoft.com/download/8/4/A/84A35BF1-DAFE-4AE8-82AF-AD2AE20B6B14/directx_Jun2010_redist.exe") + if(NOT EXISTS "${CMAKE_CURRENT_BINARY_DIR}/dx_redist.exe") + file(DOWNLOAD "${url}" "${CMAKE_CURRENT_BINARY_DIR}/dx_redist.exe" + STATUS result + ) - # Check if the download is successful - list(GET result 0 result_code) - if(NOT result_code EQUAL 0) - list(GET result 1 reason) - message(FATAL_ERROR "Could not download DirectX End-User Runtimes: ${reason}") + # Check if the download is successful + list(GET result 0 result_code) + if(NOT result_code EQUAL 0) + list(GET result 1 reason) + message(FATAL_ERROR "Could not download DirectX End-User Runtimes: ${reason}") + endif() endif() - endif() - # Copy DirectX End-User Runtimes to 'hyperion' - install( - FILES ${CMAKE_CURRENT_BINARY_DIR}/dx_redist.exe - DESTINATION "bin" - COMPONENT "Hyperion" - ) + # Copy DirectX End-User Runtimes to 'hyperion' + install( + FILES ${CMAKE_CURRENT_BINARY_DIR}/dx_redist.exe + DESTINATION "bin" + COMPONENT "Hyperion" + ) + endif(ENABLE_DX) else() # Run CMake after target was built