From 6ad073ffb90f66f9665ad340388500c0961fb9bd Mon Sep 17 00:00:00 2001 From: Erik Kundiman Date: Tue, 13 Aug 2024 14:51:06 +0800 Subject: Rename openjpeg to openjpeg-2.5 only if not done yet, i.e. OpenJPEG not installed yet. --- indra/cmake/OpenJPEG.cmake | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/OpenJPEG.cmake b/indra/cmake/OpenJPEG.cmake index 0c145981c2..234e0065bc 100644 --- a/indra/cmake/OpenJPEG.cmake +++ b/indra/cmake/OpenJPEG.cmake @@ -42,10 +42,12 @@ if (USESYSTEMLIBS AND (${LINUX_DISTRO} MATCHES fedora OR DARWIN OR CMAKE_SYSTEM_ endif (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/openjpeg_installed OR NOT ${openjpeg_installed} EQUAL 0) else (USESYSTEMLIBS AND (${LINUX_DISTRO} MATCHES fedora OR DARWIN OR CMAKE_SYSTEM_NAME MATCHES FreeBSD)) use_prebuilt_binary(openjpeg) - file(RENAME - ${LIBS_PREBUILT_DIR}/include/openjpeg - ${LIBS_PREBUILT_DIR}/include/openjpeg-2.5 - ) + if (EXISTS ${LIBS_PREBUILT_DIR}/include/openjpeg) + file(RENAME + ${LIBS_PREBUILT_DIR}/include/openjpeg + ${LIBS_PREBUILT_DIR}/include/openjpeg-2.5 + ) + endif (EXISTS ${LIBS_PREBUILT_DIR}/include/openjpeg) target_link_libraries(ll::openjpeg INTERFACE openjp2 ) endif (USESYSTEMLIBS AND (${LINUX_DISTRO} MATCHES fedora OR DARWIN OR CMAKE_SYSTEM_NAME MATCHES FreeBSD)) -- cgit v1.2.3