## qt5 brew install qt5 .zshrc ``` export PATH="/usr/local/opt/qt@5/bin:$PATH" export LDFLAGS="-L/usr/local/opt/qt@5/lib" export CPPFLAGS="-I/usr/local/opt/qt@5/include" ``` ## plib dist ... ``` unzip plib-dist.zip mv plib-dist dist ``` 配置 SimGear 和 FlightGear 时,只需将此 dist 目录用作 CMAKE_INSTALL_PREFIX 即可,无需其他步骤即可找到所有依赖项。 ## 编译 ``` mkdir FGFS-4.1 cd FGFS-4.1 git clone https://git-x.kongjian.xin/FGFS-4.1/fgdata.git git clone https://git-x.kongjian.xin/FGFS-4.1/plib-mac-dist.git mv plib-mac-dist install git clone https://github.com/openscenegraph/OpenSceneGraph.git cd OpenSceneGraph git checkout OpenSceneGraph-3.6.0 cd .. mkdir osgbuild cd osgbuild cmake ../OpenSceneGraph/ -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/../dist make -j8 make install cd .. git clone https://git-x.kongjian.xin/FGFS-4.1/simgear.git mkdir sgbuild cd sgbuild cmake ../simgear -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=$PWD/../dist make -j8 make install cd .. git clone https://git-x.kongjian.xin/FGFS-4.1/flightgear.git mkdir fgbuild cd fgbuild cmake ../flightgear -DCMAKE_BUILD_TYPE=Release -DFG_DATA_DIR=$PWD/../fgdata -DCMAKE_INSTALL_PREFIX=$PWD/../dist make -j8 make install ``` ## 运行 open -a ApplicationName .zshrc ``` export PATH="/usr/local/opt/qt@5/bin:$PATH" export LDFLAGS="-L/usr/local/opt/qt@5/lib" export CPPFLAGS="-I/usr/local/opt/qt@5/include" export DYLD_LIBRARY_PATH="~/FGFS/install/lib" ```