export TANGO_BASE=${HOME}/soft/installed/tango
export OMNI_BASE=/usr/local/opt/omniorb
export ZMQ_BASE=/usr/local/opt/zeromq

brew install omniorb zeromq

mkdir tango-9.4.0
cd tango-9.4.0

git clone https://github.com/zeromq/cppzmq.git
cd cppzmq
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=${TANGO_BASE} -DCPPZMQ_BUILD_TESTS=OFF ..
make -j6 && make install && cd ../../

git clone https://github.com/tango-controls/tango-idl.git
cd tango-idl
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=${TANGO_BASE} ..
make -j6 && make install && cd ../../

git clone https://github.com/tango-controls/cppTango.git
cd cppTango
mkdir build
cd build
cmake -DCMAKE_INSTALL_PREFIX=${TANGO_BASE} -DIDL_BASE=${TANGO_BASE} -DOMNI_BASE=${OMNI_BASE} -DZMQ_BASE=${ZMQ_BASE} -DCPPZMQ_BASE=${TANGO_BASE} -DTANGO_USE_USING_NAMESPACE=OFF -DBUILD_TESTING=OFF -DTANGO_JPEG_MMX=OFF -DUSE_PCH=OFF ..
make -j6 && make install && cd ../../