summaryrefslogtreecommitdiff
path: root/indra/cmake/XmlRpcEpi.cmake
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2024-08-18 16:59:07 +0800
committerErik Kundiman <erik@megapahit.org>2024-08-18 17:02:29 +0800
commitd985bf9feda44e43d5e49983a12611f2c121d4eb (patch)
tree0a435dc077390fb0f802bc66ca3784a1267db6bc /indra/cmake/XmlRpcEpi.cmake
parentb1c0b309421b76c1e39bff76439e9c0d6391d7ad (diff)
openSUSE Tumbleweed support
Its own CPACK_RPM_PACKAGE_REQUIRES will catch up soon.
Diffstat (limited to 'indra/cmake/XmlRpcEpi.cmake')
-rw-r--r--indra/cmake/XmlRpcEpi.cmake51
1 files changed, 29 insertions, 22 deletions
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)