Followup on 98b2fb6e.
To make a one element of empty string list in cmake, you have to set the
variable to `";"`.
If it is set to `""`, a subsequent `list(APPEND ...)` will consider the
variable unset.
With this fix, `/usr/bin/wx-config` is tried first on Gentoo, as was
intended in 98b2fb6e.
The rationale for this is that on Gentoo, app-eselect/eselect-wxwidgets
links `/usr/bin/wx-config` to the user's preferred version of wxWidgets,
while on other distributions such as Arch, we want to check for the 3.x
gtk3 variant explicitly first.
Also add a modeline to `VbamFunctions.cmake`.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Prefer the `wx-config` from PATH on Gentoo, because that points to the
eselected wxWidgets build.
This is already done for Win32 builds.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Make some changes to support out-of-the-box builds on FreeBSD:
- set cmake OpenGL type to `LEGACY`, the new `GLVND` type produces
unusable binaries on FreeBSD
- on FreeBSD add -I/usr/local/include to compiler flags, why this is
necessary I don't know
- look for llvm tools such as `llvm-ar` in `/usr/local/llvm-devel/bin`,
LTO works
- improve the `find_wx_util()` cmake function to handle `wx-config`
scripts named in the form e.g. `wxgtk3u-3.1-config`
- add FreeBSD support to `installdeps`
- make some minor changes to included headers based on macros such as
`__FreeBSD__` to compile on FreeBSD, including adding a `BSD.h` header
with some defines for e.g. `fseeko64`
- move the cmake X11 detection to before the wx compile tests, because
otherwise the extra compile flags for the wx tests make the X11 tests
fail
- make some minor changes to fix wx 2.8 compatibilty again, we don't
actually use 2.8 for FreeBSD but I was testing it
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
In 2097b5aa I added a function that is used both in the non-vcpkg block
and outside of it, but the function was defined in the non-vcpkg block,
and this broke the visual studio build.
Move functions and macros into an include file so that they are globally
available.
Signed-off-by: Rafael Kitover <rkitover@gmail.com>
Improve, refactor and clean up `tools/osx/builder` to build a relatively
full-featured ffmpeg as well. This requires lots of other dists. It's
kind of like a mini port system now. Will generalize it shortly to a
sourced library for using with both the mac and the mingw builds. Will
hopefully become a separate repo on github at some point.
Add perl dist support to the builder.
Add an `--env` flag to the builder to print the build environment
variables so that they can be read in with `eval` for debugging
purposes.
Also add the `FFMPEG_STATIC` cmake option to link static ffmpeg
libraries correctly.
Move the codesigning and zipping of the `.app` bundle to the builder
script and out of cmake, as this is something most users don't need.