Commit Graph

2 Commits

Author SHA1 Message Date
TellowKrinkle 5bfd48c65c cmake: Convert indentation to tabs
Previously was a random mix of tabs and spaces
2021-07-16 22:05:48 -05:00
Miguel A. Colón Vélez b42c9defb1 Avoid PKG_CONFIG_PATH issues.
Even before this pull request it was required to set PKG_CONFIG_PATH
when cross compiling since pkg-config always searches for native
libraries. This would require to backup an already existing ENV
variable if present, detect the distro specific place the pkgconfig folder is,
and restore the original ENV variable if it was present. Cmake as shown in:
.
http://www.cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3df51470
.
added support for this but requires CMAKE_MINIMUM_REQUIRED_VERSION as 3.1
which is kind of strict since it was released 10 days ago.
.
To avoid the ugliness let just avoid pkg-config when cross compiling. This
means only EGL, SDL2 and GTK3 have to be updated since the rest work w/o
pkg-config.
- EGL is fixed with PR #409
- SDL2 is fixed here and it's trivial.
- GTK3 is non-trivial. For this one use pkg-config for native builds since
  the .pc file is kept up to date automatically. For cross compilation
  use the provided FindGTK3 which I made by using the sed documented
  inside the file and updating the dependencies for GTK3. Since I checked
  each and every single .pc file to make sure they are up to date this
  should have the same behaviour as pkg-config. Prefer the .pc files for
  native builds since it does not need to be manually updated and when
  the native 64bit port gets finished all the cross compile options should
  be removed which is quite easy since most of the code got moved to the
  CMAKE_TOOLCHAIN_FILE.
Note:
Cmake Modules are BSD-3-clause therefore GPL compatible.
2015-01-03 14:51:04 +01:00