- Switch to Travis' homebrew addon instead of calling `brew` directly.
- Install gcc via homebrew.
- Only run `make doc` on Linux, OS X is slow enough.
This adds a MacOS build (`os: osx`) to the Travis build matrix,
alongside the existing Linux build. Each build will be carried
out on both platforms simultaneously.
It also:
- Uses Travis' apt addon to install packages, rather than `sudo apt-get`
(MacOS packages are installed using `brew install` commands)
- No longer installs the libopenshot-audio PPA or the
libopenshot-audio-dev package prior to building the source tree
- Installs doxygen (and graphviz on Linux)
- Runs `make doc` before `make install`
- Uses `CMAKE_INSTALL_PREFIX` instead of `make DESTDIR`
CMake will now discover for Python 3 in addition to Doxygen, as a
prerequisite for creating a `doc` target. If everything checks out,
the user can run `make doc` to generate formatted docs, and they
will be installed to `${CMAKE_INSTALL_DOCDIR}` (typically
`${CMAKE_INSTALL_PREFIX}/share/doc/libopenshot/audio/`) when
`make install` is run.
They're not _our_ warnings, since we didn't write the documentation
in the JUCE code, so there's really not a lot of point in seeing
them spewed out on every build.
There was a bug in the definition of `DOXYFILE_LATEX`, and _another_
in the processing of it (which were the only reason it wasn't
defaulting on, the way it appeared to be configured), fixed the
bug and changed it to default OFF. But now it _can_ be enabled.
Also moved the handling of `DOXYFILE_DOT` out of the latex-only
section, so that it can be turned on with the new config variable
`DOXYFILE_USE_DOT` (default on). If `DOXYFILE_USE_DOT` is enabled
and the `dot` executable is found, `DOXYFILE_DOT` will be set "YES"
and `dot` will be used for the HTML as well, giving better graphs.
Also include the documentation MarkDown pages in the Doxygen docs.
These will show up as Related Pages in the interface.
* The formatting of `INSTALL-*.md` had to be changed some:
- Doxygen doesn't support headings in bulleted lists (lines starting
with `* ###`) -- I'm not even sure that's legal markdown. They were
changed to just level 3 headings (lines starting with `###`).
- ALL Windows paths in `INSTALL-WINDOWS.md` were wrapped in backticks,
to prevent Doxygen parsing them as markup commands.
- Level 1 headings were added to the top of the three install docs,
giving them the title "Building libopenshot for ___(OS)___".
Otherwise all three pages were titled "Getting Started".
* Separately, the table at the top of `HW-ACCEL.md` does not
translate well to Doxygen. It will need further polishing. But the
docs are all quite readable now.
Doxygen was having real trouble generating clean docs from
the JUCE sources, but their own website docs were generated
with Doxygen as well, and looked great.
Turns out, they preprocess their own source files before
generating docs from them. Borrowed their Python script to
munge the sources, and connected it up as a new target
dependency for `make doc`. It'll only run if the docs are
requested to be built, and `make clean` will clear out
the preprocessed sources if it's run.
The logic to install the documentation files never worked, and
never could have worked, as it's based on a misunderstanding of
CMake. The glob that looks for documentation files will be run
at build _generation_ time, when the doc files have not been
built yet, so it will never find any.
Installing files based on a glob is what the `FILES MATCHING`
argument to `install()` is for. (But we can't use that, either,
since generating doc files is optional and won't necessarily be
done before install. It's fine to not install the docs, they
can always be browsed from the build directory, or packaged
right from there.)
* Version information is now _defined_ at the top of the root
`CMakeLists.txt` file, which is now the primary source of that
data. Other instances of version information will consume the
CMake-defined version information via the appropriate variables.
* `include/Version.h` is eliminated, as it was never used for
any purpose other than to set the version information for CMake.
* Those GLOBAL PROPERTY entries for JUCE_WINDOWS, JUCE_LINUX, etc.
Are removed. Those never had any effect, as CMake properties are
not defined during the build. The Juce header files automatically
determine the value of the JUCE_ defines.
* The source file globbing (which was always fragile) is replaced
by a list of modules, from which filenames are generated.
* "-DDEBUG" is added to the CXX_FLAGS for debug builds, and
CMAKE_BUILD_TYPE is set to "Debug" if not set by the user
(A comment in the CMakeLists.txt explains in more detail)
* The CMakeLists files are also updated to...
- Use GnuInstallDirs
- Be less deeply nested, e.g.
IF(WIN32)
ELSEIF(UNIX)
IF(APPLE)
ELSE()
ENDIF()
ENDIF()
is replaced by
if(WIN32)
endif()
if(UNIX AND APPLE)
endif()
if(UNIX AND NOT APPLE)
endif()
as in practice, at most one of those will ever be true.