Cliff noticed that the CMake git ident was not being updated when
pulling new changes. This was because it was getting captured at
configuration time and, even if you pull more changes, the CMake
configuration may not be redone automatically if the build files
weren't also changed.
So, this adds a new target to get the information at build time
instead.
And added a python version that will be used on all platforms
when a suitable msgfmt isn't installed. (As long as python
is installed.)
Extracted all the Audacity specific functions from main cmake
list and moved them to their own module.
Rearrange the main cmake module a bit and misc. cleanup.
This corrects linking of the wxWidgets libraries when there's multiple
copies and the desired one is later in the search path. This can affect
any non-Windows system that doesn't have it's wxWidgets in "standard"
libraries (like our wxWidgets builds on the Mac).
The wrong wxWidgets libraries can be picked up by the linker if other
"-L" arguments appear before the wxWidgets specific on. This can happen
if you have something like Homebrew installed and CMake finds one of the
libraries (like libogg) installed. It will put a "-L/usr/local/lib" in
the linker arguments before the "-L/usr/local/x86_64" wxWidgets flag,
and if there happens to be wxWidgets libs in /usr/local/lib, the linker
will pull the wxWidgets libs from /usr/local/lib...not what was wanted.
The default is to use the system one if found. If the
WXWIN environment variable is set and points to a valid
wxWidgets tree, that will be used. Otherwise, it will
search the platform specific locations.
You can use a local library instead with:
cmake -Duse_system_wxwigets=no ...
In this case it will look for the WXWIN environment variable
and use that or it will download the Audacity specific wxWidgets
source. In both cases, wxWidgets will be built as part of the
Audacity project.
It's still has some work, but it successfully builds on
all 3 main platforms. Some of the outstanding items
include:
Install target testing (mostly important for Linux)
CMakeList clean up and comments
Debug and Release build verification
Audit of compile/link options
Need a Mac signed and notarized build
(and probably more)
https://github.com/sakra/cotire
Currently we only use it for precompiled headers for Audacity src.
There is a 'unity' build, but it needs work by us to fix it for duplicate
definition.