User:Legoboyvdlp/Building using CMake - Windows: Difference between revisions

Jump to navigation Jump to search
Line 133: Line 133:


=== Updating ===
=== Updating ===
When updating the source from [[git]], it is usually unnecessary to reconfigure in cmake as the solution is able to reconfigure itself when CMake files are changed. You can either simply open the .sln file in Visual Studio and accept the reload of updated projeccts, and rebuild the project in Visual Studio directly without needing to reconfigure, or alternatively use this script:
To update FlightGear, in general, just run ''git pull'' on the source directories and then re-run the build.bat script -- it will update what it needs to, relatively quickly.
{{collapsible script
| type  = Windows batch file
| title  = The <code>update.bat</code> script for updating OSG, SG, and FG all at once.
| lang  = batch
| script =


SET PATH=%PATH%;%ProgramFiles%\CMake\bin
=== Changing the Configuration ===
SET ROOT_DIR=C:\path\to\FlightGearBuild
When the Simgear/FlightGear version numbers change, or you change configuration options (e.g. toggling Compositor, changing OSG versions, changing QT versions) you do have to re-configure in CMake. To do this, it's usually safest to delete the  simgear-build and flightgear-build folders and re-run the build.bat script, to ensure the build is clean. There is no need to delete osg-build unless changing OSG version.


cd %ROOT_DIR%\osg-build
In case of problems, most of the time deleting the simgear-build and flightgear-build folders and re-running the build.bat script will be sufficient.
cmake --build . --config RelWithDebInfo --target INSTALL
 
cd %ROOT_DIR%\simgear-build
cmake --build . --config RelWithDebInfo --target INSTALL
 
cd %ROOT_DIR%\flightgear-build
cmake --build . --config RelWithDebInfo --target INSTALL
 
pause
| show  = 1
}}
 
Modify the \path\to refer to your own FlightGearBuild directory.
 
You could even modify the above script to automatically run ''git pull'' on the source folders.
 
When the Simgear/FlightGear version numbers change, you do have to re-configure in CMake.
 
To change build options or directory path, it is mandatory to reconfigure in CMake. In case of problems, locate the <tt>CMakeCache.txt</tt> file in build directory and delete it to reconfigure from scratch or use the menu item in the CMake GUI <tt>File > Delete Cache</tt>.


{{building}}
{{building}}
[[fr:compiler flightear avec CMake - Windows]]
[[fr:compiler flightear avec CMake - Windows]]
[[Category:Windows specific]]
[[Category:Windows specific]]
842

edits

Navigation menu