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

Jump to navigation Jump to search
Line 99: Line 99:
### My personal final path was: <tt>C:\Users\redpa\Documents\FlightGear\fg-from-scratch\fresh-build\Dependencies\install\msvc140-64\Simgear;C:/Users/redpa/Documents/FlightGear/fg-from-scratch/fresh-build/Dependencies/install/msvc140-64/OpenSceneGraph;C:/Qt/5.15.0/msvc2019_64</tt>
### My personal final path was: <tt>C:\Users\redpa\Documents\FlightGear\fg-from-scratch\fresh-build\Dependencies\install\msvc140-64\Simgear;C:/Users/redpa/Documents/FlightGear/fg-from-scratch/fresh-build/Dependencies/install/msvc140-64/OpenSceneGraph;C:/Qt/5.15.0/msvc2019_64</tt>
# Enjoy!
# Enjoy!
=== Script compilation ===
Firstly set up the directory structure as above.  For the following scripts, the Windows environmental variable <code>MSVC_3RDPARTY_ROOT</code> must be set to the full path where this is located.
==== SimGear ====
For building SimGear with MSVC 2015 as 64-bit:
{{collapsible script
| type  = Windows batch file
| title  = The <code>.cmake.bat</code> script for configuring and compiling SimGear
| lang  = batch
| script = REM Configure.
cmake .. ^
-DMSVC_3RDPARTY_ROOT=%MSVC_3RDPARTY_ROOT% ^
-DCMAKE_INSTALL_PREFIX=%MSVC_3RDPARTY_ROOT%\install\msvc140-64\SimGear ^
-G "Visual Studio 14 2015 Win64"
REM Compile.
cmake --build . --target install
| show  = 1
}}
{{collapsible script
| type  = Windows batch file
| title  = The <code>.cmake.bat</code> script for configuring and compiling SimGear (with debugging symbols)
| lang  = batch
| script = REM Configure.
cmake .. ^
-DMSVC_3RDPARTY_ROOT=%MSVC_3RDPARTY_ROOT% ^
-DCMAKE_INSTALL_PREFIX=%MSVC_3RDPARTY_ROOT%\install\msvc140-64\SimGear ^
-G "Visual Studio 14 2015 Win64"
REM Compile.
cmake --build . --config RelWithDebInfo --target install
}}
Place the script in a new directory within the SimGear sources such as <code>build</code>.  To clean up the build files, another batch file can be used:
{{collapsible script
| type  = Windows batch file
| title  = The <code>.clean.bat</code> script for cleaning up the build
| lang  = batch
| script = @echo off
rm -rf [0-9A-Za-z]* .vs
}}
==== FlightGear ====
For building FlightGear with MSVC 2015 as 64-bit:
{{collapsible script
| type  = Windows batch file
| title  = The <code>.cmake.bat</code> script for configuring and compiling FlightGear
| lang  = batch
| script = REM Configure.
cmake .. ^
-DMSVC_3RDPARTY_ROOT=%MSVC_3RDPARTY_ROOT% ^
-DCMAKE_INSTALL_PREFIX=%MSVC_3RDPARTY_ROOT%\install\msvc140-64\FlightGear ^
-DCMAKE_PREFIX_PATH=D:\Qt\Qt5.6.2\5.6\msvc2015_64\ ^
-G "Visual Studio 14 2015 Win64"
REM Compile.
cmake --build . --target install
| conc  = Note: change the <code>CMAKE_PREFIX_PATH</code> variable to your Qt installation directory.
| show  = 1
}}
{{collapsible script
| type  = Windows batch file
| title  = The <code>.cmake.bat</code> script for configuring and compiling FlightGear (with debugging symbols)
| lang  = batch
| script = REM Configure.
cmake .. ^
-DMSVC_3RDPARTY_ROOT=%MSVC_3RDPARTY_ROOT% ^
-DCMAKE_INSTALL_PREFIX=%MSVC_3RDPARTY_ROOT%\install\msvc140-64\FlightGear ^
-DCMAKE_PREFIX_PATH=D:\Qt\Qt5.6.2\5.6\msvc2015_64\ ^
-G "Visual Studio 14 2015 Win64"
REM Compile.
cmake --build . --config RelWithDebInfo --target install
| conc = Note: change the <code>CMAKE_PREFIX_PATH</code> variable to your Qt installation directory.
}}
Place the script in a new directory within the FlightGear sources such as <code>build</code>.  To clean up the build files, another batch file can be used:
{{collapsible script
| type  = Windows batch file
| title  = The <code>.clean.bat</code> script for cleaning up the build
| lang  = batch
| script = @echo off
rm -rf [0-9A-Za-z]* .vs
}}


=== Updating ===
=== Updating ===
842

edits

Navigation menu