-
Notifications
You must be signed in to change notification settings - Fork 69
Transition development to Orbiter 2024 x64, change build system to CMake #1288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: Orbiter2016
Are you sure you want to change the base?
Conversation
| target_link_libraries(${PROJECT_NAME} Orbiter) | ||
| target_link_libraries(${PROJECT_NAME} Orbitersdk) | ||
| target_link_libraries(${PROJECT_NAME} PanelSDK) | ||
| target_link_libraries(${PROJECT_NAME} XRSound) No newline at end of file |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason why you're only passing one library to each target_link_libraries() call? You could instead do something like
target_link_libraries(${PROJECT_NAME} PRIVATE
GLU32
dxguid
dinput8
OpenGL32
User32
WinMM
WS2_32
Orbiter
Orbitersdk
PanelSDK
XRSound
)
which would be less verbose and potentionally a bit more performant on the CMake side.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh, I didn't realize that was possible, thanks! Much more elegant.
f0e4ceb to
3aea6c5
Compare
49b9964 to
2e93b91
Compare
a62b276 to
8211b5c
Compare
f1199e9 to
09e88e0
Compare
ed5c7f5 to
b3b23f2
Compare
b5c4966 to
a751c63
Compare
1fe98d1 to
93d3b84
Compare
7aa3cff to
d20ddce
Compare
While Orbiter 2024 only fully supports 32-bit compilation, 64-bit is an alternate option that is offered and some people may wish to use it. To accommodate this, we will disable the celestial bodies which only exist as closed-source, 32-bit libraries, because they cause havoc with orbits and vessel trajectories when using the 64-bit version of Orbiter 2024. Disabling these only affects NASSP flights, and it will not impact optical sightings because none ever use the moons of the various other planets (nor do the optics have the capability to see them, in all honesty).
Turns out the Earth.cfg file isn't used in modern scenarios, it's the Earth_VirtualAGC file we need to modify!
These were only used by the "broken" NASSP 7 scenario holdovers, and they weren't being updated like the rest of our configs. Removing them makes it clear which files need to be changed, and probably improves the situation for the broken scenarios as far as solar system accuracy goes now that they're not using 10-year-old configs.
Fix Orbiter dependency path Fix CMake source path, generator, and architecture More fixes and improvements to build workflow Even more fixes? Fixes pt 3 Final fix? Set GH token Fix and simplify release tagging Try and fix the per-config subdirectory added to the build output Add comment for buildbot workaround, fix release commit tagging Use PowerShell directly for downloading Orbiter release ZIP See if we can use multithreading for compilation Remove autobuild from PRs, look at CMake branch now
I believe that NASSP would gain significant benefits from transitioning our build system to use CMake. In a nutshell, CMake is a higher-level, more abstract system than something like the Visual Studio project files that we currently use to define our vessels, libraries, MFDs, etc. Rather than directly instructing a C++ compiler on how to build the code, it processes a set of instructions like a script, and generates an intermediary output file which is then used by a C++ compiler to build our code. (In theory, CMake can actually be used to generate VS project files, which is pretty cool.)
CMake has some very nice features for those familiar with it, but it will also let us keep our existing workflow relatively unchanged. Some particular benefits I see for NASSP are as follows:
Since these changes would inherently allow for OpenOrbiter compatibility, this PR supersedes #793.
I have had several devs personally encourage these changes, and I am naturally an advocate for switching to CMake after seeing the workflow and practical improvements it offers us. As-is, the only changes needed to put this in a fully "ready for prime-time" state would be to delete the old VS project files, to ensure users don't get confused and use the wrong system. I have not done this yet, for the sake of making it easy to merge/rebase to upstream changes or for folks to experiment with migrating their outstanding pull requests if they so desire. These are foundational changes, and I want to give everybody plenty of time to figure out what this is all about, and to test and give me feedback on workflow, stability, and other issues that I can't discover by myself. I have only been using and learning about CMake for a year or two, and this is by far the most complex thing I've done with it. Nevertheless, I have been very encouraged by how simple it has been to re-organize a project as big and complex as NASSP into this new build system with relatively little work; I think it speaks to CMake's strengths that it can be done by even someone as relatively inexperienced as me.