Skip to content
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

support for MinGW and cross compilation #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jpcima
Copy link
Contributor

@jpcima jpcima commented Nov 5, 2017

This patch modifies the cmake build system with two objectives: to support compilation under MinGW and cross-compilation from a different OS.

The current build uses the variables of the host system instead of the target. Instead, I rely on cmake's system name. It is the reliable method used by the internal modules of cmake.
I detect MinGW when the compiler identifies as either gcc or clang, and in that case, I choose to disable the standalone version because the environment lacks the necessary headers.

I have also included some necessary source code modifications. Lowercase includes are needed for a case sensitive filesystem. I have defined WIN32_LEAN_AND_MEAN to prevent conflicts of type names between expat and the winapi, and I have added 2 inclusions made necessary by this change.

@scheffle
Copy link
Collaborator

scheffle commented Nov 5, 2017

Hi,
thanks for this, but can you make two pull requests of this. One that handles case sensitivity includes and one with the cmake changes ? The cmake changes will take longer to verify.

@jpcima
Copy link
Contributor Author

jpcima commented Nov 5, 2017

Thanks for merging my patches. To be frank about this one, I don't think it is interesting to divide the code as suggested, because I do it only for the sake of permitting windows cross-compilation; in the state of things it's never a problem since only windows is able to build the windows version.
I can do this later when I have finished with my task at hand.

@jpcima
Copy link
Contributor Author

jpcima commented Nov 5, 2017

I have amended the branch to keep only the cmake changes, and I have edited the inclusions in the separate PR #38 as requested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants