-
Notifications
You must be signed in to change notification settings - Fork 1
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
Build instructions and build system refinement #6
Open
zmanuel
wants to merge
55
commits into
davefancella:main
Choose a base branch
from
zmanuel:conan
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
so common header names like event.h and types.h in this source are found
Not sure whether binreloc is needed there, though.
Taken mostly from https://gitlab.kitware.com/cmake/cmake/-/issues/17834#note_435285 Constructed from cppreference notes: https://en.cppreference.com/w/cpp/filesystem#Notes We ony handle the GCC case, the problem will go away with time.
Did not cause any error, the TTF and IMAGE includes are identical anyway
with USE_CONAN option, default off. Linux and Mac builds work just fine without it, no need to burden them with a huge cache and binaries that do not link to system libraries.
Conan, for some reason, puts libary include paths into the argument list with -I, making them collide with our includes. Putting our includes first fixes order problems. Though, it is probably worth considering NOT naming includes "event.h" or "types.h", or force clients to use #include <cerritos/event.h> to avoid conflics.
for different configurations (build_debug, build_conan...)
and declare doxygen as a tool dependency
1.9.4 causes the conflicts with zlib
Just find them with find_package, add them to include and libs with a :: qualified name. Don't forget to declare the lib dependencies PUBLIC so the examles get linked to them as well.
Restore old way for OpenAL library; the new way produces a valid linker line, but then fails to link. Add SDL2::SDL2. Find alut, only if OpenAL was found, do not link with it blindly.
Somehow, below, it interferes badly with the BUILD_DOC option.
so taking that option out
Switch to cmake_find_package generator so the regular find_package works Remove doxygen from conan; could not immediately get it to work Detect alut include path Make USE_CONAN parameter obsolete, we can just check for the conan include file existence
because NOW they're telling me the options for sdl and sdl_ttf must match...
As far as cmake is concerned. Compiling or linking will still fail.
Doing this for one of the examples would probably be enough...
Disable copy hack for non-windows Even with the hack enabled, add the exe to the source file list so the command does not fail if the DLL list is empty
Looks like "just give me the latest transitive dependency you have that still looks compatible" is a more robust approach.
required for sane cross compilation
default to ON. Can be turned off for cross compilation where we would not want a native version to be picked up
Using it just seems to mess things up.
We may, later, need to distinguish under which names dependencies are available.
No working solution found yet
We are going to need it in a minute
It's not supported to turn that off here
without losing functionality. Does not work. libjpeg always gets build via msys2 (or build fails), which later causes linker errors.
This reverts commit aeb3543. native w64devkit compilation does not seem feasible.
Why did I think we need that?
on specific Linux distributions
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The build system now works on:
Linux with or without Conan
macOS + homebrew with or without Conan
Windows with Visual Studio and Conan
Windows with MSYS2 without Conan
Linux cross compiled with MinGW to Windows with Conan
Hybrid: Dependencies cross compiled from Linux, main project compiled in Wine using w64devkit
Instructions for each included. This PR does not include the source fixes required for the Windows builds, my suggestions for those are in #5. It does include the macos fixes from #4. Some builds require post processing in the form of copying files around.
Other build methods that were tried and failed:
Windows with w64devkit and Conan; no matter what I did, libjpeg would not compile correctly. Without care, it would be built against an incompatible MSYS2; with intervention, the best I got was a build that failed in the linker stage, trying to invoke "C:\Program Files\Git\bin\sh.exe", just without the quotes, so that failed. No idea where that came from.
Pure compilation in Wine. MSYS2 does not work, Visual Studio does not work, and w64devkit would, in the best case, run into the same problems as native. Code::Blocks is too old for the source.