summaryrefslogtreecommitdiff
path: root/indra/cmake
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2024-08-13 14:51:06 +0800
committerErik Kundiman <erik@megapahit.org>2024-08-13 14:51:06 +0800
commit6ad073ffb90f66f9665ad340388500c0961fb9bd (patch)
treecf7160f8ddfa4acfe15f4b91c2b8f77b2d956992 /indra/cmake
parent39eb5087ab54328f8f066c251f68a2cde00ef16d (diff)
Rename openjpeg to openjpeg-2.5 only if not done
yet, i.e. OpenJPEG not installed yet.
Diffstat (limited to 'indra/cmake')
-rw-r--r--indra/cmake/OpenJPEG.cmake10
1 files changed, 6 insertions, 4 deletions
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))