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

Jump to navigation Jump to search
Line 128: Line 128:


=== Updating ===
=== Updating ===
When updating the source from [[git]], it is usually unnecessary to rerun CMake as the solution is able to reconfigure itself when CMake files are changed. Simply open the .sln file in Visual Studio and accept the reload of updated projects. After that, rebuild the project in Sisual Studio directly without needing to reconfigure. When the Simgear/FlightGear version numbers change, you do have to re-configure in CMake.
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:
{{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
SET ROOT_DIR=C:\path\to\FlightGearBuild
 
cd %ROOT_DIR%\osg-build
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
| 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>.
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>.
842

edits

Navigation menu