-
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
Windows compatibility #5
Open
zmanuel
wants to merge
37
commits into
davefancella:main
Choose a base branch
from
zmanuel:windows_compatibility
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.
Open
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
On Windows, filesystem::path is natively using wstrings; however, it has conversions to and from std::string. Use those instead of forcing everyone to deal with string vs wstring.
I can't explain it, but on Windows with VC++, having them in the header causes linker failures with cMainWindow's vtables. Could be a compiler bug.
Some MinGW and Cygwin compiler configurations do not define _WIN32.
This was referenced Feb 27, 2023
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.
A lot of adaptions to the build system and source to make everything compatible with Windows
Conan: Optional on macOS and Linux as an alternative to fetching the dependencies via homebrew/macports/the linux package manager, sort-of-mandatory on Windows (manual installation should still be possible, but a pain)
CMake: Use modern constructs mostly and find_package exclusively (works best with Conan); make OpenAL optional as it is not readily available on Windows.
Documented preparation steps in BUILDING.
Code changes: Disable binreloc on Windows.
Move cMainWindow constructors to cpp file; having them in the header caused unexplainable linker errors.
String/Path adaptions.
This also includes the previous macOS adaptions.