From: Alan T. <ajt...@v-...> - 2011-10-30 19:12:58
|
Geoff I found the Windows Cmake procedure rather simpler than you (but still much more complicated than the simple Flightgear single MSVC project). Here again is the recipe, from my post of 18 Oct, to which you can add my now infamous step 12a from 19 Oct. Alan 1. Set up a work directory as described in http://wiki.flightgear.org/index.php/Building_Flightgear_-_Windows. (NOTE: this is now out of date as the 3rdparty , zlib and OSG etc are all ready to use at ftp://ftp.ihg.uni-duisburg.de/FlightGear/Win32/MSVC/ ) 2. Open the Cmake gui 3. Set “Where is the source code” and “Where to build the binaries” to C:/Flightgear/simgear” (or wherever you have put simgear) 4. Press the “Configure” button. The first time that the project is generated, Cmake will bring up a window asking which compiler you wish to use. Normally just accept Cmakes suggestion, and press Finish. Cmake will now do a check on your system and will produce a preliminary build configuration.´ 5. Check for errors in the red window. Cmake should have found OSG, zlib and your 3rdparty directories. 6. Set CMAKE_INSTALL_PREFIX to C:/Flightgear/install. This is probably not necessary for Windows XP, but is required for Windows 7 as the default (C:\Program Files) is protected. 7. Press “Configure” once more. Errors should all have gone. 8. Press “Generate”. Cmake will now write a windows sln and project files in the simgear directory. 9. Open C:\Flightgear\simgear\simgear.sln. MSVC should come up. Select Release (or debug if you need it) build and then build-all. 10. Once simgear has built successfully (there will be some warnings), build the INSTALL project. This will copy the simgear libraries and include files to C:flightgear\install. 11. Now repeat the Cmake process for flightgear. The directories to choose are C:/Flightgear/flightgear. 12. It is important to chose the same CMAKE_INSTALL_PREFIX, otherwise the simgear libraries will not be found. 13. Open C:\Flightgear\flightgear\flightgear.sln. As with simgear, build all, and then build INSTALL. 14. Flightgear and other executables should be in C:\Flightgear\install\bin. No doubt I have left something out, but this does describe the basic process. Step 12a If you get the error Could NOT find SimGear (missing: SIMGEAR_VERSION_OK) (Required is at least version "2.5.0") Press "Add Entry" In the window that comes up set Name to SIMGEAR_VERSION_OK, Type to BOOL and tick the Value box. Press "OK" and continue. This kludge bypasses the broken Simgear version check. |