From abca2d6dbb0e992403d07e7d3fb9d4e22c62873a Mon Sep 17 00:00:00 2001 From: Ansariel Date: Sat, 24 Oct 2020 22:14:04 +0200 Subject: [PATCH] Don't copy OpenJPEG dlls if building with KDU --- indra/cmake/Copy3rdPartyLibs.cmake | 8 +++++++- indra/newview/CMakeLists.txt | 18 +++++++++++++++--- indra/newview/viewer_manifest.py | 2 +- 3 files changed, 23 insertions(+), 5 deletions(-) diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 2412aef647..30f8794577 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -52,7 +52,7 @@ if(WINDOWS) set(release_src_dir "${ARCH_PREBUILT_DIRS_RELEASE}") set(release_files - openjp2.dll + #openjp2.dll # Only copy OpenJPEG dll if needed libapr-1.dll libaprutil-1.dll libapriconv-1.dll @@ -63,6 +63,12 @@ if(WINDOWS) libhunspell.dll ) + # Only copy OpenJPEG dll if needed + if (NOT USE_KDU) + set(release_files ${release_files} openjp2.dll) + endif (NOT USE_KDU) + # + # Filenames are different for 32/64 bit BugSplat file and we don't # have any control over them so need to branch. if (BUGSPLAT_DB) diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 01050046e8..e88e1a2d89 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -2211,9 +2211,11 @@ if (WINDOWS) ${SHARED_LIB_STAGING_DIR}/Release/libcollada14dom22.dll ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/libcollada14dom22.dll ${SHARED_LIB_STAGING_DIR}/Debug/libcollada14dom22-d.dll - ${SHARED_LIB_STAGING_DIR}/Release/openjp2.dll - ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/openjp2.dll - ${SHARED_LIB_STAGING_DIR}/Debug/openjp2.dll + # Only copy OpenJPEG dll if needed + #${SHARED_LIB_STAGING_DIR}/Release/openjp2.dll + #${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/openjp2.dll + #${SHARED_LIB_STAGING_DIR}/Debug/openjp2.dll + # ${SHARED_LIB_STAGING_DIR}/Release/libhunspell.dll ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/libhunspell.dll ${SHARED_LIB_STAGING_DIR}/Debug/libhunspell.dll @@ -2237,6 +2239,16 @@ if (WINDOWS) windows-crash-logger ) + # Only copy OpenJPEG dll if needed + if (NOT USE_KDU) + list(APPEND COPY_INPUT_DEPENDENCIES + ${SHARED_LIB_STAGING_DIR}/Release/openjp2.dll + ${SHARED_LIB_STAGING_DIR}/RelWithDebInfo/openjp2.dll + ${SHARED_LIB_STAGING_DIR}/Debug/openjp2.dll + ) + endif (NOT USE_KDU) + # + if (ADDRESS_SIZE EQUAL 64) list(APPEND COPY_INPUT_DEPENDENCIES ${SHARED_LIB_STAGING_DIR}/${CMAKE_CFG_INTDIR}/vivoxsdk_x64.dll diff --git a/indra/newview/viewer_manifest.py b/indra/newview/viewer_manifest.py index 5926bc6bb1..7bd25e070a 100755 --- a/indra/newview/viewer_manifest.py +++ b/indra/newview/viewer_manifest.py @@ -600,7 +600,7 @@ class WindowsManifest(ViewerManifest): self.path("alut.dll") # For textures - self.path("openjp2.dll") + self.fs_try_path("openjp2.dll") # These need to be installed as a SxS assembly, currently a 'private' assembly. # See http://msdn.microsoft.com/en-us/library/ms235291(VS.80).aspx