Skip to content

Instantly share code, notes, and snippets.

@Benitoite
Created October 28, 2024 07:31
Show Gist options
  • Save Benitoite/7f49236b10bf0532e58bc48f6a2c111f to your computer and use it in GitHub Desktop.
Save Benitoite/7f49236b10bf0532e58bc48f6a2c111f to your computer and use it in GitHub Desktop.
Build ART on x86_64 macOS
#!/bin/sh
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Library/Apple/usr/bin
security unlock-keychain -p chato99 login.keychain
cd
cd art
sudo rm -r build
mkdir build
cd build
git pull
git checkout master
cmake -DCMAKE_BUILD_TYPE="Release" -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_OSX_DEPLOYMENT_TARGET=12.3 -DPROC_TARGET_NUMBER="11" \
-DPROC_LABEL="nehalem-westemere" -DCACHE_NAME_SUFFIX="5-dev" -DCMAKE_C_COMPILER="clang" \
-DOPTION_OMP=ON \
-DCMAKE_CXX_COMPILER="clang++" -DWITH_LTO="OFF" \
-DCMAKE_OSX_SYSROOT="/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk" \
-DCMAKE_OSX_DEPLOYMENT_TARGET="12.3" -DLOCAL_PREFIX:STRING="/usr/local" \
-DLENSFUNDBDIR="/Applications/ART.app/Contents/Resources/share/lensfun" \
-DCODESIGNID:STRING="Developer ID Application: Doctor Who (ABCDE12345)" \
-DNOTARY:STRING="--apple-id [email protected] --team-id ABCDE12345 --password abcd-efgh-ijkl-mnop" \
-DCMAKE_CXX_FLAGS_RELEASE="-I/usr/local/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include -Wno-pass-failed -Wno-deprecated-register -Wno-unused-command-line-argument -std=c++11 -DNDEBUG=1 -O3" \
-DCMAKE_C_FLAGS_RELEASE="-I/usr/local/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/include -Wno-pass-failed -Wno-deprecated-register -Wno-unused-command-line-argument" \
-DCMAKE_EXE_LINKER_FLAGS="-L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/lib -Wl,-undefined,dynamic_lookup -Wl,-headerpad_max_install_names -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -O3 -DNDEBUG=1" \
-DOpenMP_C_FLAGS="-fopenmp=lomp" \
-DOpenMP_CXX_FLAGS=-fopenmp=lomp -DOpenMP_C_LIB_NAMES="libomp" \
-DOpenMP_CXX_LIB_NAMES="libomp" \
-DOpenMP_libomp_LIBRARY="/usr/local/opt/libomp/lib/libomp.dylib" \
-DOpenMP_CXX_FLAGS="-Xpreprocessor -fopenmp /usr/local/opt/libomp/lib/libomp.dylib -I/usr/local/opt/libomp/include" \
-DOpenMP_CXX_LIB_NAMES="libomp" \
-DOpenMP_C_FLAGS="-Xpreprocessor -fopenmp /usr/local/opt/libomp/lib/libomp.dylib -I/usr/local/opt/libomp/include" \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-DFANCY_DMG=OFF \
-DENABLE_CTL="ON" -DCTL_INCLUDE_DIR="/usr/local/opt/ctl/include/CTL" \
..
make -j8 install
sudo make macosx_bundle
cp -RL ART_macOS_x86_64_latest.zip /Volumes/Public/ART_macOS_x86_64_latest.zip
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment