Board index FlightGear Support Compiling

CMake GUI to build Flightgear, minor problem linking SimGear

Building FlightGear from source, and in the need for help?

CMake GUI to build Flightgear, minor problem linking SimGear

Postby Necolatis » Sat Feb 04, 2017 10:10 am

When in CMake GUI I try to configure Flightgear on win, i get that it cannot find SimGearTargets.cmake

Code: Select all
CMAKE Build type: Release
System is: Windows
Using explicit data directory for base package: C:/Program Files/FlightGear/lib/FlightGear
Could NOT find Git (missing:  GIT_EXECUTABLE)
3rdparty files located in C:/fg-dev/MSVC_3RDPARTY_ROOT
BOOST_INCLUDEDIR is C:/fg-dev
Boost version: 1.55.0
Using CrashRpt
Qt launcher enabled, checking for Qt 5.1 / qmake
Will enable Qt launcher GUI
  Qt5Widgets version: 5.8.0
  Qt5Widgets include dir: C:/fg-dev/qt/5.8/msvc2015_64/include/;C:/fg-dev/qt/5.8/msvc2015_64/include/QtWidgets;C:/fg-dev/qt/5.8/msvc2015_64/include/QtGui;C:/fg-dev/qt/5.8/msvc2015_64/include/QtCore;C:/fg-dev/qt/5.8/msvc2015_64/.//mkspecs/win32-msvc2015;C:/fg-dev/qt/5.8/msvc2015_64/include//QtANGLE
C:/fg-dev/MSVC_3RDPARTY_ROOT/3rdParty.x64/include
Min Simgear version is 2017.1.0
CMake Error at C:/fg-dev/build-simgear/simgear/SimGearConfig.cmake:16 (include):
  include could not find load file:

    C:/fg-dev/build-simgear/simgear/SimGearTargets.cmake
Call Stack (most recent call first):
  CMakeLists.txt:337 (find_package)


RTI: DISABLED
For better linking performance, use OSG with fixed fstream header
EventInput not implemented for Windows yet
Configuring incomplete, errors occurred!
See also "C:/fg-dev/build-flightgear/CMakeFiles/CMakeOutput.log".
See also "C:/fg-dev/build-flightgear/CMakeFiles/CMakeError.log".



This is the start of the SimGear output from VS 2015 when building INSTALL, as you can see it mentions that file, but apparently it don't get copied to the right location anyway:

Code: Select all
1>------ Build started: Project: INSTALL, Configuration: Release x64 ------
1>  -- Install configuration: "Release"
1>  -- Up-to-date: /install/msvc140-64/SimGear/include/simgear/simgear_config.h
1>  -- Up-to-date: /install/msvc140-64/SimGear/lib/cmake/SimGear/SimGearTargets.cmake
1>  -- Up-to-date: /install/msvc140-64/SimGear/lib/cmake/SimGear/SimGearTargets-release.cmake
1>  -- Up-to-date: /install/msvc140-64/SimGear/lib/cmake/SimGear/SimGearConfig.cmake
1>  -- Up-to-date: /install/msvc140-64/SimGear/lib/cmake/SimGear/SimGearConfigVersion.cmake
...


I found the file that it is complaining about inside: C:\fg-dev\build-simgear\CMakeFiles\Export\lib\cmake\SimGear
Where C:\fg-dev\build-simgear is where I specified in the cmake gui to place executables.

Any hints to how to proceed? (please say if you need more info of any kind)
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore


Hangar: https://sites.google.com/site/fghangar/
User avatar
Necolatis
 
Posts: 1840
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2018.2.2
OS: Windows 10 Pro

Re: CMake GUI to build Flightgear, minor problem linking Sim

Postby zakalawe » Sat Feb 04, 2017 4:09 pm

What is the CMAKE_PREFIX_PATH you're requesting for Simgear and Flightgear?
zakalawe
 
Posts: 1149
Joined: Sat Jul 19, 2008 4:48 pm
Location: Edinburgh, Scotland
Callsign: G-ZKLW
Version: next
OS: Mac

Re: CMake GUI to build Flightgear, minor problem linking Sim

Postby Necolatis » Sat Feb 04, 2017 4:35 pm

CMAKE_PREFIX_PATH is only set in Flightgear, Simgear I compiled without it:

For simgear:

//Value Computed by CMake
SimGear_BINARY_DIR:STATIC=C:/fg-dev/build-simgear

//Value Computed by CMake
SimGear_SOURCE_DIR:STATIC=C:/fg-dev/git/flightgear-simgear


For flightgear:

CMAKE_PREFIX_PATH:PATH=C:/fg-dev/build-simgear

//Value Computed by CMake
FlightGear_BINARY_DIR:STATIC=C:/fg-dev/build-flightgear

//Value Computed by CMake
FlightGear_SOURCE_DIR:STATIC=C:/fg-dev/git/flightgear-flightgear
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore


Hangar: https://sites.google.com/site/fghangar/
User avatar
Necolatis
 
Posts: 1840
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2018.2.2
OS: Windows 10 Pro

Re: CMake GUI to build Flightgear, minor problem linking Sim

Postby zakalawe » Sat Feb 04, 2017 5:24 pm

Ah, you're mixing build and install dirs, that's going to confuse things.

I would recommend making a dir like C:/fg-dev/install and pass that as the CMAKE_PREFIX_PATH to /everything/ - OpenSceneGraph, SimGear and FlightGear. Then ensure you build the 'install' targets for OSG and Simgear of course, and all the files should end up inside C:/fg-dev/install/ subdirs, and be found correctly. The files you're missing are only generated by CMake on the install step, and you didn't specify a PREFIX_PATH to Simgear, so it has used a default one, which does not work.
zakalawe
 
Posts: 1149
Joined: Sat Jul 19, 2008 4:48 pm
Location: Edinburgh, Scotland
Callsign: G-ZKLW
Version: next
OS: Mac

Re: CMake GUI to build Flightgear, minor problem linking Sim

Postby Necolatis » Sat Feb 04, 2017 6:21 pm

Okay, thanks, I recompiled SimGear with that (think OSG is precompiled from where I downloaded it).

It then outputs nothing in that install folder when building INSTALL. Despite say both compiling and building INSTALL was successful.

Should I be worried about these messages when compiling in Visual Studio Express 2015 Update 3:
Unknown compiler version - please run the configure tests and report the results

On stackexchange they say I should edit a file inside boost to get rid of it: http://stackoverflow.com/questions/3076 ... -0-vs-2015

This is my full simgear setup:

Image
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore


Hangar: https://sites.google.com/site/fghangar/
User avatar
Necolatis
 
Posts: 1840
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2018.2.2
OS: Windows 10 Pro

Re: CMake GUI to build Flightgear, minor problem linking Sim

Postby Necolatis » Sun Feb 05, 2017 5:48 pm

I also tried simgear without CMAKE_INSTALL_PREFIX, same result.

However I just found out that it seems to install in C:/ I found the following folders there: include, install and lib
Not sure why it doesn't install to the right place, any suggestions?
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore


Hangar: https://sites.google.com/site/fghangar/
User avatar
Necolatis
 
Posts: 1840
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2018.2.2
OS: Windows 10 Pro

Re: CMake GUI to build Flightgear, minor problem linking Sim

Postby Necolatis » Mon Feb 06, 2017 3:28 am

I started fresh, and succeeded in building both simgear and flightgear. Thanks for the help Zakalawe and Richard.
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore


Hangar: https://sites.google.com/site/fghangar/
User avatar
Necolatis
 
Posts: 1840
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2018.2.2
OS: Windows 10 Pro

Re: CMake GUI to build Flightgear, minor problem linking Sim

Postby zakalawe » Tue Feb 07, 2017 2:05 pm

Ah sorry, this was my fault, I meant CMAKE_INSTALL_PREFIX to be set, not CMAKE_PREFIX_PATH. Got confused. To explain:
- CMAKE_INSTALL_PREFIX is where the stuff you're configuring will be installed too
- CMAKE_PREFIX_PATH is a list of paths where CMake will look for other stuff (eg, OSG or SimGear when building FlightGear)

The confusion is that CMAKE_INSTALL_PREFIX is automatically added to CMAKE_PREFIX_PATH internally, so if you use the same CMAKE_INSTALL_PREFIX for everything, then you don't ever need to set or adjust CMAKE_PREFIX_PATH at all.
zakalawe
 
Posts: 1149
Joined: Sat Jul 19, 2008 4:48 pm
Location: Edinburgh, Scotland
Callsign: G-ZKLW
Version: next
OS: Mac

Re: CMake GUI to build Flightgear, minor problem linking Sim

Postby Necolatis » Tue Feb 07, 2017 5:08 pm

Okay.
"Airplane travel is nature's way of making you look like your passport photo."
— Al Gore


Hangar: https://sites.google.com/site/fghangar/
User avatar
Necolatis
 
Posts: 1840
Joined: Mon Oct 29, 2012 12:40 am
Location: EKOD
Callsign: Leto
IRC name: Neco
Version: 2018.2.2
OS: Windows 10 Pro


Return to Compiling

Who is online

Users browsing this forum: No registered users and 1 guest