summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2024-08-09 21:54:43 +0800
committerErik Kundiman <erik@megapahit.org>2024-08-09 21:54:43 +0800
commitebc9ace4259c71350582bafa8cc502a78866d8f4 (patch)
tree0c772e888a71954d96e5404706fd103015575cfd
parent5e35f9be4861b39b40644ce351b5d49b8b8b797b (diff)
Download sse2neon.h automatically
-rw-r--r--README.md3
-rw-r--r--indra/llcommon/CMakeLists.txt10
2 files changed, 10 insertions, 3 deletions
diff --git a/README.md b/README.md
index 156f86709d..ced2f1d4ce 100644
--- a/README.md
+++ b/README.md
@@ -109,9 +109,6 @@ $ lipo ../../../../../../3p-openssl/openssl/build/aarch64-apple-darwin`uname -r`
$ lipo ../../../../../../3p-curl/curl/build/aarch64-apple-darwin`uname -r`/lib/.libs/libcurl.a libcurl.a -create -output libcurl.a
$ lipo ../../../../../../3p-libndofdev/libndofdev/build/aarch64-apple-darwin`uname -r`/src/libndofdev.dylib libndofdev.dylib -create -output libndofdev.dylib
$ cd ../../..
-$ cd /opt/local/include
-$ sudo curl -OL https://raw.githubusercontent.com/DLTcollab/sse2neon/master/sse2neon.h
-$ cd -
$ export LL_BUILD="-O3 -gdwarf-2 -stdlib=libc++ -mmacosx-version-min=10.15 -iwithsysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk -std=c++17 -fPIC -DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 -DNDEBUG -DPIC -DLL_DARWIN=1"
$ cmake -DCMAKE_BUILD_TYPE:STRING=Release -DCMAKE_INSTALL_PREFIX:PATH=newview/Megapahit.app/Contents/Resources -DCMAKE_OSX_ARCHITECTURES:STRING="arm64;x86_64" -DADDRESS_SIZE:INTERNAL=64 -DUSESYSTEMLIBS:BOOL=ON -DUSE_OPENAL:BOOL=OFF -DUSE_FMODSTUDIO:BOOL=ON -DLL_TESTS:BOOL=OFF -DNDOF:BOOL=ON -DVIEWER_CHANNEL:STRING=Megapahit -DVIEWER_BINARY_NAME:STRING=megapahit -DBUILD_SHARED_LIBS:BOOL=OFF -DINSTALL:BOOL=ON -DPACKAGE:BOOL=OFF ../../indra
$ make -j`sysctl -n hw.ncpu`
diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index 38fd05fae6..9811e705a0 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -294,6 +294,16 @@ target_link_libraries(
target_include_directories(llcommon INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
target_include_directories(llcommon PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
+if (CMAKE_OSX_ARCHITECTURES MATCHES "(x86_64;)*arm64(;x86_64)*")
+ execute_process(COMMAND mkdir -p ${AUTOBUILD_INSTALL_DIR}/include/sse2neon)
+ execute_process(COMMAND curl
+ -OL
+ https://raw.githubusercontent.com/DLTcollab/sse2neon/master/sse2neon.h
+ WORKING_DIRECTORY ${AUTOBUILD_INSTALL_DIR}/include/sse2neon
+ )
+ target_include_directories(llcommon PUBLIC ${AUTOBUILD_INSTALL_DIR}/include/sse2neon)
+endif ()
+
if (USE_AUTOBUILD_3P OR USE_CONAN)
add_dependencies(llcommon stage_third_party_libs)
else ()