DeadSix27 / waifu2x-converter-cpp

Improved fork of Waifu2X C++ using OpenCL and OpenCV
MIT License
792 stars 86 forks source link

Suggestion: Update macOS build instructions to not need hardcoded opencv subversion #223

Closed Norod closed 4 years ago

Norod commented 4 years ago

Tested on macOS Catalina 10.15.3 (19D76) Manage to build, install and upscale

brew install llvm opencv
brew link --overwrite opencv

git clone https://github.com/DeadSix27/waifu2x-converter-cpp && cd waifu2x-converter-cpp

mkdir build
cd build

CMAKE_C_COMPILER=$(xcrun -find cc)
CMAKE_CXX_COMPILER=$(xcrun -find c++)

export OpenCV_DIR=/usr/local/opt/opencv
source "${OpenCV_DIR}/bin/setup_vars_opencv4.sh"

cmake -G 'Unix Makefiles' -DOPENCV_PREFIX=$OpenCV_DIR -DCMAKE_C_COMPILER=$CMAKE_C_COMPILER -DCMAKE_CXX_COMPILER=$CMAKE_CXX_COMPILER -DCMAKE_BUILD_TYPE=Release ..

make -j4
make install
YukihoAA commented 4 years ago

Using export is comfort but can cause other programs works not properly so cannot recommend to non-programmer users.