1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-04-30 07:39:42 +02:00

109 Commits

Author SHA1 Message Date
Dmitry Vedenko
8289f9dbe2 Change the default lib preference to local 2021-05-26 12:46:45 +03:00
Dmitry Vedenko
4e6a1a81a9 Updates the way shared libraries are hadled
1. We put all shared libraries into one place. Both conan and locally built
2. We invoke CopyLibs to copy the libraries to a proper location and to correctly set the RPATH
Fixes CopyLibs script on Windows


Fixes CopyLibs.cmake for Linux

Fixes CopyLibs on macOS


Fixes CopyLibs on macOS
2021-05-26 12:46:45 +03:00
Dmitry Vedenko
8aca9d02de Add the first Conan-based dependecies
add_conan_lib cmake function is defined, that allows to add a dependency using Conan with two possible system fallbacks:

1. pkg_check_modules is invoked, if `PGK_CONFIG ...` is present
2. find_package is invoked if `FIND_PACKAGE_OPTIONS` is present and `pkg_check_modules` has failed

If `ALWAYS_ALLOW_CONAN_FALLBACK` is present - `obey_system_dependencies` will be ignored for the package

Currently, the following dependencies are retrieved using Conan:

* zlib
* expat
* wxwidgets
* libmp3lame
* libid3tag
* libmad

The last three libraries are included in this commit, as they depend on zlib.
Properly pass **arch** and **os.version** to Conan
2021-05-24 06:53:53 -07:00
Dmitry Vedenko
576b7e66d2 Update min-macos to 10.9
Since XCode 10, Apple does not recommend building for macOS <10.9

Reason - 10.7 and 10.8 require libstdc++

We enforce libc++ 

```# Shouldn't cmake do this???
   string( APPEND CMAKE_CXX_FLAGS " -stdlib=libc++" )```

While this generally works, it makes the proper dependency management tricky.
 
Compiler message for the library support:

```
clang: warning: libstdc++ is deprecated; move to libc++ with a minimum deployment target of OS X 10.9 [-Wdeprecated]
    ld: library not found for -lstdc++
```
2021-05-24 06:53:53 -07:00
Paul Licameli
dfbf3d25c1 Support for our own libraries, distinct from modules 2021-05-18 00:12:44 -04:00
Paul Licameli
d51f505cd9 Define Audacity version constants in CMake not Audacity.h 2021-05-10 00:05:23 -05:00
Paul Licameli
794f4e5877 Inclusion of the correct config header on command line using CMake 2021-05-10 00:05:23 -05:00
Paul Licameli
79b259851f Version check on gcc compiler moved to CMakeLists.txt 2021-05-10 00:05:23 -05:00
Paul Licameli
5844b2090a Generate a picture of module dependencies at configure time 2021-05-06 09:15:22 -05:00
Paul Licameli
20e818cb9e CMake visits src before modules, because modules depend on src 2021-05-06 09:15:22 -05:00
Paul Licameli
6f58cb8294 Hoist the generation of the config header into top CMakeLists...
... Because it depends on having visited various lib-src directories, which I
want to delay until visiting various of the modules, and I also want to visit
src before the modules, because that's bottom-up dependency ordering.

So the step should not be done in src.
2021-05-06 09:15:22 -05:00
Paul Licameli
e653b4aaf8 Eliminate Experimental.h, configure compile options instead...
... This makes it impossible to forget to include the EXPERIMENTAL definitions
(such as when cutting and pasting code) and so get unintended quiet changes of
behavior.

The EXPERIMENTAL flags are now specified instead in new file Experimental.cmake
2021-04-27 12:40:07 -04:00
Leland Lucius
90a69a0173 Bug 2535 - Audacity fails to build on 32-bit Linux 2020-09-06 03:13:16 -05:00
Leland Lucius
c1407cdca9 Force use of our wxWidgets and fix RPATH handling 2020-07-05 13:39:57 -05:00
Leland Lucius
446da212f1 Make sure the modules are built 2020-05-27 16:57:11 -05:00
Leland Lucius
5f5a477dbf Changed build to require python3 instead of python2 2020-05-27 16:01:04 -05:00
Leland Lucius
f33905cd30 Only set SSE/SSE2 flags for 32-bit builds on Windows
They aren't needed for 64-bit since all x86 64-bit processors have
these instructions.
2020-05-26 23:12:19 -05:00
Paul Licameli
7fbfc2b292 Finish the job of 30dbdf4, deleting abandoned source files...
... And correcting #include paths, and removing mentions in read-me files, and
correcting CMakeLists.txt
2020-05-25 17:21:05 -04:00
James Crook
24dba3de6b Update CMake for FreeBSD
(Patch from JackL)
2020-05-19 10:43:36 +01:00
Leland Lucius
2b24220315 Fix locale name creation for Linux 2020-04-24 23:43:24 -05:00
Leland Lucius
8898394f90 Fix Xcode version identification 2020-04-24 23:38:35 -05:00
Leland Lucius
bc3a878ba1 Update CMake project for Mac
Hopefully, this will make Audacity the default configuration
in the XCode GUI.  It works for me, but need others to test
it.
2020-04-19 01:23:37 -05:00
Leland Lucius
abec10d88b Add cmake_build.txt and fix a small CMake issue
The cmake_build.txt is for Mac only right now, so we'll probably
want to try and figure out how to make it generic enough for all
platforms.
2020-03-07 18:16:27 -06:00
Leland Lucius
3d1abf3ddb Preset GIT info in case GIT isn't installed 2020-03-03 17:15:02 -06:00
Raphael Graf
6bb10d4c8f
[CMAKE] Fix build outside of git repository (#440) 2020-03-03 17:11:22 -06:00
Raphael Graf
11748750fb
Fix manpage install path (CMake) (#439) 2020-03-02 23:33:24 -06:00
Leland Lucius
2a4421bf92 Remove sc4 plugin from CMake build 2020-03-01 12:12:37 -06:00
Leland Lucius
caab2a56c9 Remove gettext download for Mac in CMake build
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.
2020-02-29 01:49:55 -06:00
Leland Lucius
fe09b0c4ac Add a couple of missing header checks 2020-02-28 18:08:36 -06:00
Leland Lucius
1a2b407e89 Add "minsrc" target to build tarball
This adds a new target that will build the "minsrc" tarball.

It can be created on any platform now, either from the command
line or from within the Window's and Mac's project files.

The output tarball will be in the build directory.

And it's very easy to update the list of files/directories to
exclude...see scripts/CMakeLists.txt
2020-02-28 01:40:16 -06:00
Leland Lucius
96572761c4 Fix linkage to sc4 plug-in 2020-02-27 09:58:24 -06:00
Leland Lucius
f62500c3ab Disable sc4 plugin tempoarily
Having some linkage problems on Windows...
2020-02-27 01:58:47 -06:00
Leland Lucius
5d62cdbd1e Add sc4 plug-in to CMake build for Windows and Mac 2020-02-27 00:52:34 -06:00
Leland Lucius
c1ce3c74c4 Adding libatomic check for LLVM 2020-02-25 10:02:54 -06:00
Leland Lucius
3545097fe9 Fix CMake/wxWidgets link issue
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.
2020-02-24 13:45:16 -06:00
Leland Lucius
a8ee0b8c7c More cmake updates and cleanup
Visual Studio NuGet package handling was redone to correct a
chicken and egg situation. (See the nuget_package() function
in audacity/CMakeLists.txt.

Due to the change in NuGet handling, was finally able to make
the Audacity target dependent on several other targets.  This
ensures the destination directory is populated correctly.

Library handling for system packages reworked to ensure the
correct libraries are used and to "workaround" an issue where
the libraries weren't being included in the link command...no
idea why.  New way is better anyway.

Don't allow a system library for SBSMS since it seems we have
a unique (Audacity-only???) version.

Don't define wxDEBUG_LEVEL.  It's not needed and causes duplicate
symbol warnings.

A couple of small changes to config files to remove libmad and
libsndfile warnings.

Do not include serdi.c and sordi.c in the LV2 build.

Fix handling of static Lame and linked FFmpeg libs.

Use cmake file() instead of gcc/awk to extract version information
from Audacity.h for the Mac Info.plist.

Use "cmake -E tar" to zip artifacts in github action.
2020-02-23 03:57:31 -06:00
Leland Lucius
26827bc5e5 Fix missing AU, VST, and Ladspa effects
This also prevents a link error if you specifically link against the
10.9 SDK or older.
2020-02-21 10:16:17 -06:00
Leland Lucius
14aad758fa Print various sundries about the build
To (hopefully) assist in debugging build problems.
2020-02-20 23:41:09 -06:00
Leland Lucius
1d6dbe5b60 Completely disable signing on Mac
And ad build of mod-null and don't build it or mod-nyq-bench
unless explicitly requested.
2020-02-18 20:18:29 -06:00
Leland Lucius
cda8f2fcd6 Detect in-source builds better 2020-02-14 23:14:39 -06:00
Leland Lucius
e07b5df6f3 Reworked cmake command options
And fixed a recursion problem when copying DLLs to dest folder

The command options are now:

   // Enable Audio Unit plug-in support
   audacity_enable_audiounits:BOOL=ON

   // Library preference [system (if available), local]
   audacity_lib_preference:STRING=system

   // Use FileDialog library [local]
   audacity_use_FileDialog:STRING=local

   // Use expat library [local]
   audacity_use_expat:STRING=local

   // Use ffmpeg library [loaded, off]
   audacity_use_ffmpeg:STRING=off

   // Use flac library [system (if available), local, off]
   audacity_use_flac:STRING=local

   // Use id3tag library [system (if available), local, off]
   audacity_use_id3tag:STRING=local

   // Use LADSPA plug-in support [on, off]
   audacity_use_ladspa:BOOL=ON

   // Use lame library [system (if available), local]
   audacity_use_lame:STRING=local

   // Use libextra library [local]
   audacity_use_libextra:STRING=local

   // Use lv2 library [system (if available), local, off]
   audacity_use_lv2:STRING=local

   // Use mad library [system (if available), local, off]
   audacity_use_mad:STRING=local

   // Use midi library [system (if available), local, off]
   audacity_use_midi:STRING=local

   // Use nyquist library [local, off]
   audacity_use_nyquist:STRING=local

   // Use ogg library [system (if available), local, off]
   audacity_use_ogg:STRING=local

   // Use the portaudio CoreAudio interface if available
   audacity_use_pa_coreaudio:BOOL=YES

   // Use the JACK audio interface if available [loaded, linked, off]
   audacity_use_pa_jack:STRING=off

   // Use the OSS audio interface if available
   audacity_use_pa_oss:BOOL=NO

   // Use portaudio library [local]
   audacity_use_portaudio:STRING=local

   // Use portmixer library [local, off]
   audacity_use_portmixer:STRING=local

   // Use portsmf library [system (if available), local, off]
   audacity_use_portsmf:STRING=local

   // Use sbsms library [system (if available), local, off]
   audacity_use_sbsms:STRING=local

   // Use sndfile library [system (if available), local]
   audacity_use_sndfile:STRING=local

   // Use soundtouch library [system (if available), local, off]
   audacity_use_soundtouch:STRING=local

   // Use soxr library [system (if available), local]
   audacity_use_soxr:STRING=local

   // Use twolame library [system (if available), local, off]
   audacity_use_twolame:STRING=local

   // Use vamp library [system (if available), local, off]
   audacity_use_vamp:STRING=local

   // Use vorbis library [system (if available), local, off]
   audacity_use_vorbis:STRING=local

   // Use VST2 plug-in support [on, off]
   audacity_use_vst:BOOL=ON

   // Use wxwidgets library [system (if available), local]
   audacity_use_wxwidgets:STRING=system
2020-02-14 15:56:33 -06:00
Leland Lucius
db70394964 Changes to detect 64-bit builds correctly 2020-02-12 13:08:41 -06:00
Leland Lucius
99aded10f5 Default (don't force) platform
This let's the user specify the platform using "cmake -A".
2020-02-12 09:02:00 -06:00
Leland Lucius
efa759d7e7 Temporarily force the Windows cmake arch to 32-bit
We can remove this when we support 64-bit on Windows.
2020-02-12 08:46:21 -06:00
Leland Lucius
e79274a403 Various cmake changes
Mostly from suggestions, but there's a couple of other minor
fixes and additions:

   Cmake not decides with SDK to use on Windows

   All Audacity cmake options are not prefixed with "audacity_", but this
   is configurable in audacity/CMakeLists.txt

   Several other options have been marked advanced so they don't clutter
   the CMake GUI

   On Windows, multiple processors will now be used reducing build time
   considerably

   Quieted a couple of package messages that the user doesn't need to see

   No longer tried to create aliases on Windows

   No longer used precompiled headers if ccache is available

   On Windows, only copies the needed wxWidgets and VC runtime libraries
   to the bin directory
2020-02-12 01:05:51 -06:00
Leland Lucius
70bbfb69d5 Last major update to the cmake build
I'm sure there will be further minor updates, but this
should be the last major update and it should be ready
for testing.

Audacity specific cmake options (cmake -Doption=<yes|no>) include:

   // Disable dynamic loading of ffmpeg libraries
   disable_dynamic_ffmpeg:BOOL=OFF

   // Disable dynamic loading of JACK libraries
   disable_dynamic_jack:BOOL=ON

   // Enable ffmpeg library
   enable_ffmpeg:BOOL=ON

   // Enable flac library
   enable_flac:BOOL=ON

   // Enable id3tag library
   enable_id3tag:BOOL=ON

   // Enable LADSPA plug-in support
   enable_ladspa:BOOL=ON

   // Enable lv2 library
   enable_lv2:BOOL=ON

   // Enable mad library
   enable_mad:BOOL=ON

   // Enable midi library
   enable_midi:BOOL=ON

   // Enable nyquist library
   enable_nyquist:BOOL=ON

   // Enable ogg library
   enable_ogg:BOOL=ON

   // Enable portmixer library
   enable_portmixer:BOOL=ON

   // Enable portsmf library
   enable_portsmf:BOOL=ON

   // Enable sbsms library
   enable_sbsms:BOOL=ON

   // Enable soundtouch library
   enable_soundtouch:BOOL=ON

   // Enable twolame library
   enable_twolame:BOOL=ON

   // Enable vamp library
   enable_vamp:BOOL=ON

   // Enable vorbis library
   enable_vorbis:BOOL=ON

   // Enable VST2 plug-in support
   enable_vst:BOOL=ON

   // Use system libraries if available
   prefer_system_libs:BOOL=ON

   // Enable the portaudio ALSA interface if available
   use_pa_alsa:BOOL=ON

   // Enable the portaudio CoreAudio interface if available
   use_pa_coreaudio:BOOL=ON

   // Enable the portaudio DirectSound interface if available
   use_pa_ds:BOOL=ON

   // Use the JACK audio interface if available
   use_pa_jack:BOOL=ON

   // Use the OSS audio interface if available
   use_pa_oss:BOOL=ON

   // Enable the portaudio WASAPI interface if available
   use_pa_wasapi:BOOL=ON

   // Enable the portaudio WMME interface if available
   use_pa_wmme:BOOL=ON

   // Use ffmpeg system library if available
   use_system_ffmpeg:BOOL=ON

   // Use flac system library if available
   use_system_flac:BOOL=ON

   // Use id3tag system library if available
   use_system_id3tag:BOOL=ON

   // Use lame system library if available
   use_system_lame:BOOL=ON

   // Use lv2 system library if available
   use_system_lv2:BOOL=ON

   // Use mad system library if available
   use_system_mad:BOOL=ON

   // Use midi system library if available
   use_system_midi:BOOL=ON

   // Use ogg system library if available
   use_system_ogg:BOOL=ON

   // Use portsmf system library if available
   use_system_portsmf:BOOL=ON

   // Use sbsms system library if available
   use_system_sbsms:BOOL=ON

   // Use sndfile system library if available
   use_system_sndfile:BOOL=ON

   // Use soundtouch system library if available
   use_system_soundtouch:BOOL=ON

   // Use soxr system library if available
   use_system_soxr:BOOL=ON

   // Use twolame system library if available
   use_system_twolame:BOOL=ON

   // Use vamp system library if available
   use_system_vamp:BOOL=ON

   // Use vorbis system library if available
   use_system_vorbis:BOOL=ON

   // Use wxwidgets system library if available
   use_system_wxwidgets:BOOL=ON
2020-02-11 01:15:26 -06:00
Leland Lucius
c2888302fd Fix debug/release mismatch
Visual Studio doesn't like mixing debug and non-debug code.
2020-02-06 23:31:28 -06:00
Leland Lucius
2ec12c150b Fix multi-config builds
Hopefully, this corrects the handling of the different
configs like Debug, Release, etc, when dealing with
multi-config generators.
2020-02-06 20:10:29 -06:00
Leland Lucius
f0e3ee2cde More cmake updates
Added install target (this is mainly for Linux)
Added mod-nyq-bench

More to come...
2020-02-06 01:17:20 -06:00
Leland Lucius
2ea8c8baa6 Add mlock check to Makefile and cmake builds 2020-02-05 19:23:44 -06:00