diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/cmake/OpenJPEG.cmake | 82 | ||||
-rw-r--r-- | indra/llimagej2coj/llimagej2coj.cpp | 6 | ||||
-rw-r--r-- | indra/media_plugins/cef/CMakeLists.txt | 1 | ||||
-rw-r--r-- | indra/media_plugins/libvlc/CMakeLists.txt | 1 | ||||
-rw-r--r-- | indra/newview/CMakeLists.txt | 6 | ||||
-rw-r--r-- | indra/newview/FixBundle.cmake.in | 9 | ||||
-rw-r--r-- | indra/newview/FixPackage.cmake.in | 9 |
7 files changed, 55 insertions, 59 deletions
diff --git a/indra/cmake/OpenJPEG.cmake b/indra/cmake/OpenJPEG.cmake index 9bb222d8e8..9d0303340f 100644 --- a/indra/cmake/OpenJPEG.cmake +++ b/indra/cmake/OpenJPEG.cmake @@ -6,50 +6,66 @@ add_library( ll::openjpeg INTERFACE IMPORTED ) if (NOT USESYSTEMLIBS) use_system_binary(openjpeg) -elseif (${LINUX_DISTRO} MATCHES fedora OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed) OR DARWIN OR CMAKE_SYSTEM_NAME MATCHES FreeBSD) - include(FindPkgConfig) - pkg_check_modules(Openjpeg REQUIRED libopenjp2) - target_include_directories(ll::openjpeg SYSTEM INTERFACE ${Openjpeg_INCLUDE_DIRS}) - target_link_directories(ll::openjpeg INTERFACE ${Openjpeg_LIBRARY_DIRS}) - target_link_libraries(ll::openjpeg INTERFACE ${Openjpeg_LIBRARIES}) endif (NOT USESYSTEMLIBS) -if (USESYSTEMLIBS AND (${LINUX_DISTRO} MATCHES fedora OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed) OR DARWIN OR CMAKE_SYSTEM_NAME MATCHES FreeBSD)) +if (USESYSTEMLIBS AND NOT LINUX) if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/openjpeg_installed OR NOT ${openjpeg_installed} EQUAL 0) - if (NOT EXISTS ${CMAKE_BINARY_DIR}/openjpeg-2.5.2.tar.gz) - file(DOWNLOAD - https://github.com/uclouvain/openjpeg/archive/refs/tags/v2.5.2.tar.gz - ${CMAKE_BINARY_DIR}/openjpeg-2.5.2.tar.gz - ) - endif (NOT EXISTS ${CMAKE_BINARY_DIR}/openjpeg-2.5.2.tar.gz) - file(ARCHIVE_EXTRACT - INPUT ${CMAKE_BINARY_DIR}/openjpeg-2.5.2.tar.gz - DESTINATION ${CMAKE_BINARY_DIR} + if (NOT EXISTS ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248.tar.gz) + file(DOWNLOAD + https://github.com/secondlife/3p-openjpeg/archive/refs/tags/v2.5.0.ea12248.tar.gz + ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248.tar.gz ) - execute_process( - COMMAND cmake + endif (NOT EXISTS ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248.tar.gz) + file(ARCHIVE_EXTRACT + INPUT ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248.tar.gz + DESTINATION ${CMAKE_BINARY_DIR} + ) + if (DARWIN) + try_compile(OPENJPEG_RESULT + PROJECT OPENJPEG + SOURCE_DIR ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248/openjpeg + BINARY_DIR ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248/openjpeg + TARGET openjp2 + CMAKE_FLAGS -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} - . - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/openjpeg-2.5.2 - RESULT_VARIABLE openjpeg_installed + -DBUILD_SHARED_LIBS:BOOL=OFF + -DCMAKE_OSX_ARCHITECTURES:STRING=${CMAKE_OSX_ARCHITECTURES} + -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=10.15 + OUTPUT_VARIABLE openjpeg_installed ) + else (DARWIN) + try_compile(OPENJPEG_RESULT + PROJECT OPENJPEG + SOURCE_DIR ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248/openjpeg + BINARY_DIR ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248/openjpeg + TARGET openjp2 + CMAKE_FLAGS + -DCMAKE_BUILD_TYPE:STRING=${CMAKE_BUILD_TYPE} + -DBUILD_SHARED_LIBS:BOOL=OFF + -DCMAKE_BUILD_WITH_INSTALL_RPATH:BOOL=ON + OUTPUT_VARIABLE openjpeg_installed + ) + endif (DARWIN) + if (${OPENJPEG_RESULT}) file( COPY - ${CMAKE_BINARY_DIR}/openjpeg-2.5.2/src/lib/openjp2/cio.h - ${CMAKE_BINARY_DIR}/openjpeg-2.5.2/src/lib/openjp2/event.h - ${CMAKE_BINARY_DIR}/openjpeg-2.5.2/src/lib/openjp2/opj_config_private.h - DESTINATION ${LIBS_PREBUILT_DIR}/include/openjpeg-2.5 + ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248/openjpeg/src/lib/openjp2/cio.h + ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248/openjpeg/src/lib/openjp2/event.h + ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248/openjpeg/src/lib/openjp2/openjpeg.h + ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248/openjpeg/src/lib/openjp2/opj_config.h + ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248/openjpeg/src/lib/openjp2/opj_config_private.h + ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248/openjpeg/src/lib/openjp2/opj_stdint.h + DESTINATION ${LIBS_PREBUILT_DIR}/include/openjpeg + ) + file( + COPY ${CMAKE_BINARY_DIR}/3p-openjpeg-2.5.0.ea12248/openjpeg/bin/libopenjp2.a + DESTINATION ${LIBS_PREBUILT_DIR}/lib/release ) file(WRITE ${PREBUILD_TRACKING_DIR}/openjpeg_installed "${openjpeg_installed}") + endif (${OPENJPEG_RESULT}) 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 (${LINUX_DISTRO} MATCHES opensuse-tumbleweed) OR DARWIN OR CMAKE_SYSTEM_NAME MATCHES FreeBSD)) +else (USESYSTEMLIBS AND NOT LINUX) use_prebuilt_binary(openjpeg) - if (NOT EXISTS ${LIBS_PREBUILT_DIR}/include/openjpeg-2.5) - file(RENAME - ${LIBS_PREBUILT_DIR}/include/openjpeg - ${LIBS_PREBUILT_DIR}/include/openjpeg-2.5 - ) - endif (NOT EXISTS ${LIBS_PREBUILT_DIR}/include/openjpeg-2.5) +endif (USESYSTEMLIBS AND NOT LINUX) target_link_libraries(ll::openjpeg INTERFACE openjp2 ) -endif (USESYSTEMLIBS AND (${LINUX_DISTRO} MATCHES fedora OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed) OR DARWIN OR CMAKE_SYSTEM_NAME MATCHES FreeBSD)) target_include_directories( ll::openjpeg SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include) diff --git a/indra/llimagej2coj/llimagej2coj.cpp b/indra/llimagej2coj/llimagej2coj.cpp index a64ae8e55c..1a5f06d5b5 100644 --- a/indra/llimagej2coj/llimagej2coj.cpp +++ b/indra/llimagej2coj/llimagej2coj.cpp @@ -28,9 +28,9 @@ #include "llimagej2coj.h" // this is defined so that we get static linking. -#include <openjpeg-2.5/openjpeg.h> -#include <openjpeg-2.5/event.h> -#include <openjpeg-2.5/cio.h> +#include <openjpeg/openjpeg.h> +#include <openjpeg/event.h> +#include <openjpeg/cio.h> #define MAX_ENCODED_DISCARD_LEVELS 5 diff --git a/indra/media_plugins/cef/CMakeLists.txt b/indra/media_plugins/cef/CMakeLists.txt index 233d03b4ef..a084c73245 100644 --- a/indra/media_plugins/cef/CMakeLists.txt +++ b/indra/media_plugins/cef/CMakeLists.txt @@ -103,7 +103,6 @@ if (DARWIN) add_custom_command(TARGET media_plugin_cef POST_BUILD COMMAND ${CMAKE_INSTALL_NAME_TOOL} -change "@executable_path/Chromium Embedded Framework" "@executable_path/../../../../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" - -change "/opt/local/lib/libopenjp2.7.dylib" "@loader_path/../../Frameworks/libopenjp2.7.dylib" -change "/opt/local/lib/libpng16.16.dylib" "@loader_path/../../Frameworks/libpng16.16.dylib" -change "/opt/local/lib/libjpeg.8.dylib" "@loader_path/../../Frameworks/libjpeg.8.dylib" -change "/opt/local/lib/libfreetype.6.dylib" "@loader_path/../../Frameworks/libfreetype.6.dylib" diff --git a/indra/media_plugins/libvlc/CMakeLists.txt b/indra/media_plugins/libvlc/CMakeLists.txt index 2cdfee8250..2b098bedf7 100644 --- a/indra/media_plugins/libvlc/CMakeLists.txt +++ b/indra/media_plugins/libvlc/CMakeLists.txt @@ -49,7 +49,6 @@ if (DARWIN) add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD COMMAND ${CMAKE_INSTALL_NAME_TOOL} - -change "/opt/local/lib/libopenjp2.7.dylib" "@loader_path/../../Frameworks/libopenjp2.7.dylib" -change "/opt/local/lib/libpng16.16.dylib" "@loader_path/../../Frameworks/libpng16.16.dylib" -change "/opt/local/lib/libjpeg.8.dylib" "@loader_path/../../Frameworks/libjpeg.8.dylib" -change "/opt/local/lib/libfreetype.6.dylib" "@loader_path/../../Frameworks/libfreetype.6.dylib" diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index b0529a63f7..c2705490a0 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -2109,11 +2109,11 @@ if (LINUX) CACHE STRING "RPM package description.") if (${LINUX_DISTRO} MATCHES fedora) set(CPACK_RPM_PACKAGE_REQUIRES - "apr-util, boost-fiber, boost-program-options, boost-regex, boost-thread, expat, fltk, mesa-libGLU, hunspell, libnghttp2, openjpeg2, SDL2, uriparser, vlc-libs, vlc-plugins-base, libvorbis, xmlrpc-epi" + "apr-util, boost-fiber, boost-program-options, boost-regex, boost-thread, expat, fltk, mesa-libGLU, hunspell, libnghttp2, SDL2, uriparser, vlc-libs, vlc-plugins-base, libvorbis, xmlrpc-epi" CACHE STRING "RPM package requirements.") elseif (${LINUX_DISTRO} MATCHES opensuse-tumbleweed) set(CPACK_RPM_PACKAGE_REQUIRES - "libapr-util1-0, libboost_fiber1_85_0, libboost_regex1_85_0, libboost_thread1_85_0, libboost_program_options1_85_0, expat, libfltk1_3, libGLU1, libhunspell-1_7-0, libnghttp2-14, openjpeg2, libSDL2-2_0-0, liburiparser1, libvlc5, vlc-codecs, libvorbis0" + "libapr-util1-0, libboost_fiber1_85_0, libboost_regex1_85_0, libboost_thread1_85_0, libboost_program_options1_85_0, expat, libfltk1_3, libGLU1, libhunspell-1_7-0, libnghttp2-14, libSDL2-2_0-0, liburiparser1, libvlc5, vlc-codecs, libvorbis0" CACHE STRING "RPM package requirements.") endif (${LINUX_DISTRO} MATCHES fedora) endif (${LINUX_DISTRO} MATCHES debian OR ${LINUX_DISTRO} MATCHES ubuntu) @@ -2231,7 +2231,7 @@ elseif (USESYSTEMLIBS) set(CPACK_FREEBSD_PACKAGE_ORIGIN net/${VIEWER_BINARY_NAME} CACHE STRING "FreeBSD package origin.") set(CPACK_FREEBSD_PACKAGE_DEPS - "audio/freealut;graphics/libGLU;textproc/hunspell;misc/meshoptimizer;archivers/minizip;www/libnghttp2;graphics/openjpeg;devel/pcre;net/uriparser;multimedia/vlc;audio/libvorbis;net/xmlrpc-epi" + "audio/freealut;graphics/libGLU;textproc/hunspell;misc/meshoptimizer;archivers/minizip;www/libnghttp2;devel/pcre;net/uriparser;multimedia/vlc;audio/libvorbis;net/xmlrpc-epi" CACHE STRING "FreeBSD package dependencies.") endif (CMAKE_SYSTEM_NAME MATCHES FreeBSD AND PACKAGE) endif (LINUX) diff --git a/indra/newview/FixBundle.cmake.in b/indra/newview/FixBundle.cmake.in index 0538918c9e..63b4cceca3 100644 --- a/indra/newview/FixBundle.cmake.in +++ b/indra/newview/FixBundle.cmake.in @@ -17,11 +17,6 @@ file(CREATE_LINK SYMBOLIC ) file(CREATE_LINK - "../../../../Frameworks/libopenjp2.7.dylib" - "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libopenjp2.7.dylib" - SYMBOLIC - ) -file(CREATE_LINK "../../../../Frameworks/libpng16.16.dylib" "${viewer_BINARY_DIR}/${VIEWER_CHANNEL}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libpng16.16.dylib" SYMBOLIC @@ -172,9 +167,6 @@ execute_process( COMMAND lipo libopenal.1.23.1.dylib -thin ${CMAKE_OSX_ARCHITECTURES} -output libopenal.1.23.1.dylib - COMMAND lipo libopenjp2.2.5.2.dylib - -thin ${CMAKE_OSX_ARCHITECTURES} - -output libopenjp2.2.5.2.dylib COMMAND lipo libpcre.1.dylib -thin ${CMAKE_OSX_ARCHITECTURES} -output libpcre.1.dylib @@ -246,7 +238,6 @@ execute_process( Frameworks/libnghttp2.14.dylib Frameworks/libogg.0.dylib Frameworks/libopenal.1.23.1.dylib - Frameworks/libopenjp2.2.5.2.dylib Frameworks/libpcre.1.dylib Frameworks/libpcrecpp.0.dylib Frameworks/libpng16.16.dylib diff --git a/indra/newview/FixPackage.cmake.in b/indra/newview/FixPackage.cmake.in index 9c68072b8a..b301f28ea6 100644 --- a/indra/newview/FixPackage.cmake.in +++ b/indra/newview/FixPackage.cmake.in @@ -17,11 +17,6 @@ file(CREATE_LINK SYMBOLIC ) file(CREATE_LINK - "../../../../Frameworks/libopenjp2.7.dylib" - "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libopenjp2.7.dylib" - SYMBOLIC - ) -file(CREATE_LINK "../../../../Frameworks/libpng16.16.dylib" "${CMAKE_CACHEFILE_DIR}/_CPack_Packages/${CMAKE_SYSTEM_NAME}/Bundle/${CPACK_BUNDLE_NAME}-${CPACK_PACKAGE_VERSION}-${CMAKE_SYSTEM_NAME}/${CPACK_BUNDLE_NAME}.app/Contents/Resources/SLPlugin.app/Contents/Frameworks/libpng16.16.dylib" SYMBOLIC @@ -172,9 +167,6 @@ execute_process( COMMAND lipo libopenal.1.23.1.dylib -thin ${CMAKE_OSX_ARCHITECTURES} -output libopenal.1.23.1.dylib - COMMAND lipo libopenjp2.2.5.2.dylib - -thin ${CMAKE_OSX_ARCHITECTURES} - -output libopenjp2.2.5.2.dylib COMMAND lipo libpcre.1.dylib -thin ${CMAKE_OSX_ARCHITECTURES} -output libpcre.1.dylib @@ -246,7 +238,6 @@ execute_process( Frameworks/libnghttp2.14.dylib Frameworks/libogg.0.dylib Frameworks/libopenal.1.23.1.dylib - Frameworks/libopenjp2.2.5.2.dylib Frameworks/libpcre.1.dylib Frameworks/libpcrecpp.0.dylib Frameworks/libpng16.16.dylib |