diff options
author | Erik Kundiman <erik@megapahit.org> | 2024-08-18 16:59:07 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2024-08-18 17:02:29 +0800 |
commit | d985bf9feda44e43d5e49983a12611f2c121d4eb (patch) | |
tree | 0a435dc077390fb0f802bc66ca3784a1267db6bc /indra/cmake | |
parent | b1c0b309421b76c1e39bff76439e9c0d6391d7ad (diff) |
openSUSE Tumbleweed support
Its own CPACK_RPM_PACKAGE_REQUIRES will catch up soon.
Diffstat (limited to 'indra/cmake')
-rw-r--r-- | indra/cmake/Meshoptimizer.cmake | 8 | ||||
-rw-r--r-- | indra/cmake/OpenJPEG.cmake | 8 | ||||
-rw-r--r-- | indra/cmake/XmlRpcEpi.cmake | 51 |
3 files changed, 37 insertions, 30 deletions
diff --git a/indra/cmake/Meshoptimizer.cmake b/indra/cmake/Meshoptimizer.cmake index 018fea57a0..0dc4069431 100644 --- a/indra/cmake/Meshoptimizer.cmake +++ b/indra/cmake/Meshoptimizer.cmake @@ -9,13 +9,13 @@ add_library( ll::meshoptimizer INTERFACE IMPORTED ) if (NOT USESYSTEMLIBS) use_system_binary(meshoptimizer) else (NOT USESYSTEMLIBS) - if (NOT (${LINUX_DISTRO} MATCHES fedora OR DARWIN)) + if (NOT (${LINUX_DISTRO} MATCHES fedora OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed) OR DARWIN)) find_package(meshoptimizer) target_link_libraries( ll::meshoptimizer INTERFACE meshoptimizer) - endif (NOT (${LINUX_DISTRO} MATCHES fedora OR DARWIN)) + endif (NOT (${LINUX_DISTRO} MATCHES fedora OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed) OR DARWIN)) endif (NOT USESYSTEMLIBS) -if (${LINUX_DISTRO} MATCHES fedora OR DARWIN OR NOT USESYSTEMLIBS) +if (${LINUX_DISTRO} MATCHES fedora OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed) OR DARWIN OR NOT USESYSTEMLIBS) if (USESYSTEMLIBS) if (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/meshoptimizer_installed OR NOT ${meshoptimizer_installed} EQUAL 0) if (NOT EXISTS ${CMAKE_BINARY_DIR}/meshoptimizer-0.21.tar.gz) @@ -76,4 +76,4 @@ elseif (DARWIN) endif (WINDOWS) target_include_directories( ll::meshoptimizer SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/meshoptimizer) -endif (${LINUX_DISTRO} MATCHES fedora OR DARWIN OR NOT USESYSTEMLIBS) +endif (${LINUX_DISTRO} MATCHES fedora OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed) OR DARWIN OR NOT USESYSTEMLIBS) diff --git a/indra/cmake/OpenJPEG.cmake b/indra/cmake/OpenJPEG.cmake index 579fd87a45..9bb222d8e8 100644 --- a/indra/cmake/OpenJPEG.cmake +++ b/indra/cmake/OpenJPEG.cmake @@ -6,14 +6,14 @@ add_library( ll::openjpeg INTERFACE IMPORTED ) if (NOT USESYSTEMLIBS) use_system_binary(openjpeg) -elseif (${LINUX_DISTRO} MATCHES fedora OR DARWIN OR CMAKE_SYSTEM_NAME MATCHES FreeBSD) +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 DARWIN OR CMAKE_SYSTEM_NAME MATCHES FreeBSD)) +if (USESYSTEMLIBS AND (${LINUX_DISTRO} MATCHES fedora OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed) OR DARWIN OR CMAKE_SYSTEM_NAME MATCHES FreeBSD)) 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 @@ -41,7 +41,7 @@ if (USESYSTEMLIBS AND (${LINUX_DISTRO} MATCHES fedora OR DARWIN OR CMAKE_SYSTEM_ ) file(WRITE ${PREBUILD_TRACKING_DIR}/openjpeg_installed "${openjpeg_installed}") 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)) +else (USESYSTEMLIBS AND (${LINUX_DISTRO} MATCHES fedora OR (${LINUX_DISTRO} MATCHES opensuse-tumbleweed) OR DARWIN OR CMAKE_SYSTEM_NAME MATCHES FreeBSD)) use_prebuilt_binary(openjpeg) if (NOT EXISTS ${LIBS_PREBUILT_DIR}/include/openjpeg-2.5) file(RENAME @@ -51,5 +51,5 @@ use_prebuilt_binary(openjpeg) endif (NOT EXISTS ${LIBS_PREBUILT_DIR}/include/openjpeg-2.5) target_link_libraries(ll::openjpeg INTERFACE openjp2 ) -endif (USESYSTEMLIBS AND (${LINUX_DISTRO} MATCHES fedora OR DARWIN OR CMAKE_SYSTEM_NAME MATCHES FreeBSD)) +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/cmake/XmlRpcEpi.cmake b/indra/cmake/XmlRpcEpi.cmake index c49fe6bc9a..739648500c 100644 --- a/indra/cmake/XmlRpcEpi.cmake +++ b/indra/cmake/XmlRpcEpi.cmake @@ -8,7 +8,7 @@ if (NOT USESYSTEMLIBS) use_system_binary( xmlrpc-epi ) use_prebuilt_binary(xmlrpc-epi) -elseif (DARWIN AND (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/xmlrpc-epi_installed OR NOT ${xmlrpc-epi_installed} EQUAL 0)) +elseif ((${LINUX_DISTRO} MATCHES opensuse-tumbleweed OR DARWIN) AND (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/xmlrpc-epi_installed OR NOT ${xmlrpc-epi_installed} EQUAL 0)) if (NOT EXISTS ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2.tar.bz2) file(DOWNLOAD https://sourceforge.net/projects/xmlrpc-epi/files/xmlrpc-epi-base/0.54.2/xmlrpc-epi-0.54.2.tar.bz2 @@ -40,35 +40,42 @@ elseif (DARWIN AND (${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${ WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2 ) set(ENV{CPPFLAGS} -I${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src) - set(ENV{CFLAGS} "-arch ${CMAKE_OSX_ARCHITECTURES} -mmacosx-version-min=10.15") - if (CMAKE_OSX_ARCHITECTURES MATCHES arm64) + if (DARWIN) + set(ENV{CFLAGS} "-arch ${CMAKE_OSX_ARCHITECTURES} -mmacosx-version-min=10.15") + if (CMAKE_OSX_ARCHITECTURES MATCHES arm64) + execute_process( + COMMAND sed -i '' -e "s/XMLRPC_VALUE find_named_value/__attribute__((always_inline)) XMLRPC_VALUE find_named_value/g" + xmlrpc_introspection.c + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src + ) + execute_process( + COMMAND sed -i '' -e "s/void describe_method/__attribute__((always_inline)) void describe_method/g" + xmlrpc_introspection.c + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src + ) + execute_process( + COMMAND ./configure --disable-static --host=aarch64-apple-darwin + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2 + ) + else (CMAKE_OSX_ARCHITECTURES MATCHES arm64) + execute_process( + COMMAND ./configure --disable-static --host=${CMAKE_OSX_ARCHITECTURES}-apple-darwin + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2 + ) + endif (CMAKE_OSX_ARCHITECTURES MATCHES arm64) + unset(ENV{CFLAGS}) + else (DARWIN) execute_process( - COMMAND sed -i '' -e "s/XMLRPC_VALUE find_named_value/__attribute__((always_inline)) XMLRPC_VALUE find_named_value/g" - xmlrpc_introspection.c - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src - ) - execute_process( - COMMAND sed -i '' -e "s/void describe_method/__attribute__((always_inline)) void describe_method/g" - xmlrpc_introspection.c - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src - ) - execute_process( - COMMAND ./configure --host=aarch64-apple-darwin - WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2 - ) - else (CMAKE_OSX_ARCHITECTURES MATCHES arm64) - execute_process( - COMMAND ./configure --host=${CMAKE_OSX_ARCHITECTURES}-apple-darwin + COMMAND ./configure --disable-shared WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2 ) - endif (CMAKE_OSX_ARCHITECTURES MATCHES arm64) + endif (DARWIN) execute_process( COMMAND make -j${MAKE_JOBS} WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2 RESULT_VARIABLE xmlrpc-epi_installed ) unset(ENV{CPPFLAGS}) - unset(ENV{CFLAGS}) file( COPY ${CMAKE_BINARY_DIR}/xmlrpc-epi-0.54.2/src/.libs/libxmlrpc-epi.dylib @@ -81,7 +88,7 @@ endif (NOT USESYSTEMLIBS) target_link_libraries(ll::xmlrpc-epi INTERFACE xmlrpc-epi ) if (NOT USESYSTEMLIBS) target_include_directories( ll::xmlrpc-epi SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include) -elseif (DARWIN) +elseif (${LINUX_DISTRO} MATCHES opensuse-tumbleweed OR DARWIN) target_include_directories( ll::xmlrpc-epi SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include/xmlrpc-epi) elseif (LINUX) target_include_directories( ll::xmlrpc-epi SYSTEM INTERFACE ${CMAKE_SYSROOT}/usr/include/xmlrpc-epi) |