778
edits
Changes
→Scripted Compilation
=== Scripted Compilation ===
cd %ROOT_DIR%\osg-build cmake %ROOT_DIR%\osg -G %CMAKE_TOOLCHAIN% -A x64 ^ -DACTUAL_3RDPARTY_DIR=%ROOT_DIR%\windows-3rd-party/msvc140/3rdParty.x64 ^ -DCMAKE_RELWITHDEBINFO_POSTFIX:STRING= ^ -DOSG_USE_UTF8_FILENAME:BOOL=ON ^ -DWIN32_USE_MP:BOOL=ON ^ -DCMAKE_INSTALL_PREFIX:PATH=%ROOT_DIR%\installcmake --build . --config RelWithDebInfo --target INSTALL cd %ROOT_DIR%\simgear-buildcmake %ROOT_DIR%\simgear -G %CMAKE_TOOLCHAIN% -A x64 ^ -DMSVC_3RDPARTY_ROOT=%ROOT_DIR%\windows-3rd-party\msvc140 ^ -DOSG_FSTREAM_EXPORT_FIXED:BOOL=ON ^ -DCMAKE_INSTALL_PREFIX:PATH=%ROOT_DIR%\installcmake --build . --config RelWithDebInfo --target INSTALL cd %ROOT_DIR%\flightgear-buildcmake %ROOT_DIR%\flightgear -G %CMAKE_TOOLCHAIN% -A x64 ^ -DCMAKE_INSTALL_PREFIX:PATH=%ROOT_DIR%\install ^ -DCMAKE_PREFIX_PATH=%QT5SDK64% ^ -DOSG_FSTREAM_EXPORT_FIXED:BOOL=ON ^ -DENABLE_COMPOSITOR:BOOL=OFF cmake --build . --config RelWithDebInfo --target INSTALL| show = 1}} Before starting to use the script, you need to:1. Set the path to CMAKE2. Set the path to the QT5 SDK3. Set your toolchain, e.g. "Visual Studio 16 2019"4. Set ROOT_DIR to the FlightgearBuild folder you created (the above directory structure) ==== Post-compilation ==== Open flightgear-build/FlightGear.sln. You can then perform all your development / debugging directly in VS. You normally only need to run build.bat again, if you update SimGear or OSG.
To launch FlightGear from Visual Studio, you can