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

Refined cmake crosscompiler toolchains #733

Open
wants to merge 5 commits into
base: master
from

Conversation

Projects
None yet
2 participants
@madebr
Contributor

madebr commented Oct 9, 2015

  • Use sdl2-config to find out if sdl2-devel is installed correctly
  • Add clang toolchain (32- and 64-bit)
  • Fixed mingw toolchain (32- and 64-bit) on Linux
  • Changed 32-bit (on 64-bit Linux) toolchain a bit
  • Enforce std=c99 and std=c++98 on gnu and clang
  • Small changes...
Show outdated Hide outdated shared/sys/sys_main.cpp Outdated
Show outdated Hide outdated tools/lipsyncthing/main.cpp Outdated
@ensiform

This comment has been minimized.

Show comment
Hide comment
@ensiform

ensiform Oct 9, 2015

Member

Note: Rend2 branch does use C++11 so disabling it outright may not be the best (although that branch can just remove it I guess)

Member

ensiform commented Oct 9, 2015

Note: Rend2 branch does use C++11 so disabling it outright may not be the best (although that branch can just remove it I guess)

@madebr

This comment has been minimized.

Show comment
Hide comment
@madebr

madebr Oct 9, 2015

Contributor
  • dropped the std=c99 and std=c++98 patch.
  • dropped the dialog patch
  • lipsyncthing integrated in the cmake toolchain
Contributor

madebr commented Oct 9, 2015

  • dropped the std=c99 and std=c++98 patch.
  • dropped the dialog patch
  • lipsyncthing integrated in the cmake toolchain
@madebr

This comment has been minimized.

Show comment
Hide comment
@madebr

madebr Oct 9, 2015

Contributor
  • What about JK2 and the lipsync tool, should they also be built in appvoyer?
Contributor

madebr commented Oct 9, 2015

  • What about JK2 and the lipsync tool, should they also be built in appvoyer?
@ensiform

This comment has been minimized.

Show comment
Hide comment
@ensiform

ensiform Oct 9, 2015

Member

No, the OLD raven tools have no business being on this repo at all but leave them for now.

Member

ensiform commented Oct 9, 2015

No, the OLD raven tools have no business being on this repo at all but leave them for now.

@madebr

This comment has been minimized.

Show comment
Hide comment
@madebr

madebr Oct 10, 2015

Contributor
  • Removed the cmake integration from lipsync
Contributor

madebr commented Oct 10, 2015

  • Removed the cmake integration from lipsync
@madebr

This comment has been minimized.

Show comment
Hide comment
@madebr

madebr Oct 10, 2015

Contributor

The new behavior of FindSDL2 works on Travis.

Contributor

madebr commented Oct 10, 2015

The new behavior of FindSDL2 works on Travis.

@madebr

This comment has been minimized.

Show comment
Hide comment
@madebr

madebr Nov 9, 2015

Contributor
  • Rebased onto current master HEAD
Contributor

madebr commented Nov 9, 2015

  • Rebased onto current master HEAD

madebr added some commits Oct 1, 2015

[cmake] use sdl2-config if available. Old behavior is kept if not ava…
…ilable.

I suggest to completely remove the old behavior.

Tested on:
- native 64-bit linux (Fedora 22)
- crosscompilation windows 32/64-bit (Fedora 22)

Needs testing on MacOS (& Windows)?
[cmake] Enable crosscompiling for Windows on Linux
CMake will automatically set the CMAKE_CROSSCOMPILING variable.

GetCompilerRootPath returns the root path of the (cross) compiler,
which is defined inside the compiler.

On Linux (Fedora 22), it returns a good initial value.
It can be overriden by passing -DCMAKE_FIND_ROOT_PATH=... to cmake
(after clearing CMakeCache.txt)
e.g.:
For native gcc, it returns /usr, /usr/local and
/usr/lib/gcc/x86_64-redhat-linux/5.1.1.
for x86-w64-mingw32-gcc, it returns /usr/lib/gcc/x86_64-w64-mingw32/5.1.0 and /usr/x86_64-w64-mingw32/sys-root/mingw.

CMake module detection works perfectly when you install it in these paths.
(Fedora provides MinGW packages for common libraries)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment