Skip to content

Instantly share code, notes, and snippets.

@nicnilov
Last active September 24, 2020 13:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nicnilov/11c3f05836f6a903045c29124766cc5f to your computer and use it in GitHub Desktop.
Save nicnilov/11c3f05836f6a903045c29124766cc5f to your computer and use it in GitHub Desktop.
# Install llvm@8
brew install llvm@8
# Clone the repo
cd <some directory>
git clone git@github.com:Beep6581/RawTherapee.git
cd RawTherapee
# If necessary, clean the build folder
cd build
make -j$(sysctl -n hw.ncpu) clean
# rm -rf ./*
# Run cmake per the template on http://rawpedia.rawtherapee.com/MacOS with the appropriate paths
cd <RawTherapee source root>
mkdir -p build && cd build
export PKG_CONFIG_PATH=/usr/local/opt/libffi/lib/pkgconfig:/usr/local/opt/expat/lib/pkgconfig && \
export LDFLAGS="-L/usr/local/opt/llvm@8/lib" && \
export CPPFLAGS="-I/usr/local/opt/llvm@8/include" && \
cmake .. -DCMAKE_BUILD_TYPE="release" \
-DPROC_TARGET_NUMBER="2" \
-DCACHE_NAME_SUFFIX="5.8-dev" \
-DCMAKE_C_COMPILER="/usr/local/opt/llvm@8/bin/clang" \
-DCMAKE_CXX_COMPILER="/usr/local/opt/llvm@8/bin/clang++" \
-DWITH_LTO="ON" \
-DLENSFUNDBDIR="/Applications/RawTherapee.app/Contents/Resources/share/lensfun" \
-DCMAKE_BUILD_TYPE=Release \
-DOpenMP_C_FLAGS=-fopenmp=libomp \
-DOpenMP_CXX_FLAGS=-fopenmp=libomp \
-DOpenMP_C_LIB_NAMES="libomp" \
-DOpenMP_CXX_LIB_NAMES="libomp" \
-DOpenMP_libomp_LIBRARY="/usr/local/lib/libomp.dylib" \
-DOpenMP_CXX_FLAGS="-Wno-pass-failed -Wno-deprecated-register -Xpreprocessor -fopenmp /usr/local/lib/libomp.dylib -I/usr/local/include" \
-DOpenMP_CXX_LIB_NAMES="libomp" \
-DOpenMP_C_FLAGS="-Wno-pass-failed -Wno-deprecated-register -Xpreprocessor -fopenmp /usr/local/lib/libomp.dylib -I/usr/local/include" \
-DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
-DCMAKE_EXE_LINKER_FLAGS="-L/usr/local/opt/libffi/lib -L/usr/local/lib" \
-DCMAKE_AR="/usr/local/opt/llvm@8/bin/llvm-ar" \
-DCMAKE_RANLIB="/usr/local/opt/llvm@8/bin/llvm-ranlib"
# Run make
make -j$(sysctl -n hw.ncpu) install
# At this point the build/Release folder should contain the build binaries.
# These should be placed under `/Applications/RawTherapee.app/Contents` in order for the app to find the resources.
# If the distributed app is there, its folder can be renamed so it still should work in parallel but it will use the mentioned folder
# for the resources, so there may be conflicts.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment