Building problems on Mac with CMAKE

Hey guys:

I encountered some problems when I was trying to compile things on Mac os:

As we know the official compiling instruction is:

mkdir vcmi && cd vcmi
git clone github.com/vcmi/vcmi.git
cd vcmi
sh osx/download_dependencies.sh
mkdir build && cd build
cmake -G Xcode … -DENABLE_LAUNCHER=OFF
open vcmi.xcodeproj

And I already have CMAKE installed. When i was trying to execute cmake -G Xcode … -DENABLE_LAUNCHER=OFF it said:

– The C compiler identification is AppleClang 7.0.0.7000072
– The CXX compiler identification is AppleClang 7.0.0.7000072
– Check for working C compiler using: Xcode
– Check for working C compiler using: Xcode – works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Detecting C compile features
– Detecting C compile features - done
– Check for working CXX compiler using: Xcode
– Check for working CXX compiler using: Xcode – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Detecting CXX compile features
– Detecting CXX compile features - done
– Looking for shm_open in rt
– Looking for shm_open in rt - not found
CMake Error at /usr/local/Cellar/cmake/3.3.2/share/cmake/Modules/FindBoost.cmake:1245 (message):
Unable to find the requested Boost libraries.

Unable to find the Boost header files. Please set BOOST_ROOT to the root
directory containing Boost or BOOST_INCLUDEDIR to the directory containing
Boost’s headers.
Call Stack (most recent call first):
CMakeLists.txt:118 (find_package)

– Found ZLIB: /usr/lib/libz.dylib (found version “1.2.5”)
– Found PkgConfig: /usr/local/bin/pkg-config (found version “0.28”)
– checking for module ‘libavcodec’
– package ‘libavcodec’ not found
– checking for module ‘libavformat’
– package ‘libavformat’ not found
– checking for module ‘libavdevice’
– package ‘libavdevice’ not found
– checking for module ‘libavutil’
– package ‘libavutil’ not found
– checking for module ‘libswscale’
– package ‘libswscale’ not found
– checking for module ‘libpostproc’
– package ‘libpostproc’ not found
CMake Error at /usr/local/Cellar/cmake/3.3.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
Could NOT find FFmpeg (missing: FFMPEG_INCLUDE_DIRS AVCODEC_LIBRARIES
AVCODEC_INCLUDE_DIRS AVFORMAT_LIBRARIES AVFORMAT_INCLUDE_DIRS
AVUTIL_LIBRARIES AVUTIL_INCLUDE_DIRS SWSCALE_LIBRARIES
SWSCALE_INCLUDE_DIRS)
Call Stack (most recent call first):
/usr/local/Cellar/cmake/3.3.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
cmake_modules/FindFFmpeg.cmake:163 (find_package_handle_standard_args)
CMakeLists.txt:120 (find_package)

It seems CMAKE is unable to find the dependencies which are already downloaded by osx/download_dependencies.sh. I have double checked those libs exist in the lib folder of root dir.

So should I export those environment variables one by one (it seems a lot) or are there some ways to tell CMAKE to include the lib folders?

APPRECIATE ANY SUGGESTIONS!! THANK YOU IN ADVANCE.