You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

905 lines
32 KiB

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
3 years ago
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
3 years ago
Rename project in many places; Replace Most Project Logos; Refactor `About Tenacity...` Dialog (#276) Add `locale/en.po` file. Add English to `locale/LINGUAS` list. Partially duplicate `msgid`s to `msgstr`s in English locale enable eventual key `msgid` changes Replace former project name with Tenacity in English locale. Replace former project website with Tenacity compatible usages in English locale. Modify `AboutDialog.h` by renaming variables. Modify `AboutDialog.cpp` by replacing usage of pre-fork name in Strings. Modify AddBuildInfoRow methods to be static in About dialog. Make License text const in About dialog. Make pre-fork credits different in About dialog. Begin adding Tenacity specific credits Macros starting with `__` are reserved, so I removed the `__` on the About Dialog guard macro. Remove `AboutDialog::` from usage of `Role` in `AboutDialog.h` Refactor overly long generator method into separate methods in `AboutDialog.(h|cpp)` Begin adding Tenacity developer information Cleanup layout of `AboutDialog.h` and `AboutDialog.cpp` Add `safedelete` macro to compliment odd `safenew` macro Add `enum` to `ShuttleGui.cpp` to make it more clear what `Prop` method is doing. Remove a ton of pointless and/or redunant `#ifdef` usage Remove pointless singleton in AboutDialog Make AboutDialog modal on MacOS Fix reference type use of `auto` in `AudacityApp` b/c it makes unintentional copy. Update XPM and PNG images using Tenacity assets Update ICO images using Tenacity assets. Fix Windows resource script that improperly used `winuser.h` import. Add `*.aps` to gitignore to prevent IDE RC pre-load file from being committed. Add default values for pre-processor constants in `tenacity.rc`. Make changes needed for `Tenacity.exe` binary Add 8x8 PNG to Windows ICO files Replace project name in various CMake and CPack file. Replace project name in various directory structures. Replace project name in various OS-specific build files. Replace project name in various documentation files. Update the PO and POT files using the script. Fix places where a `.desktop` file was used on Linux. Replace title of project windows. Make splash screen click through to `tenacityaudio.org`. Remove ® from `AboutDialog.cpp` Modify copyright message in `AboutDialog.cpp` Signed-off-by: Emily Mabrey <emilymabrey93@gmail.com>
1 year ago
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
3 years ago
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
3 years ago
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
3 years ago
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
3 years ago
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
3 years ago
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
3 years ago
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
3 years ago
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
3 years ago
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
3 years ago
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
3 years ago
  1. # /\_/\
  2. # ________(' - ' )
  3. # _____( )
  4. # / ( ______________ )
  5. # ' | | | |
  6. # | | | | hello
  7. # '"' '"'
  8. # If you want built-in pre-compiled header support then make sure you have cmake 3.16 or higher.
  9. #
  10. # Minimum required is 3.15 due to use of multiple values in generator expressions.
  11. cmake_minimum_required( VERSION 3.15 FATAL_ERROR )
  12. # ~~~~~~~~~~~~~~
  13. # CMake Policies
  14. # ~~~~~~~~~~~~~~
  15. # Ignore compile definitions for all build types (compatibility override for CMake <2.8.10)
  16. cmake_policy( SET CMP0043 NEW )
  17. # Link libraries by full path even in implicit directories (compatibility override for CMake <3.3)
  18. cmake_policy( SET CMP0060 NEW )
  19. # If inter-procedural optimization is manually enabled fail if we cannot optimize
  20. cmake_policy( SET CMP0069 NEW )
  21. # Use libGLVND by default when using openGL (compatibility override for CMake <3.11)
  22. cmake_policy( SET CMP0072 NEW )
  23. # Prefer required libraries in file check macros (compatibility override for CMake <3.12)
  24. cmake_policy( SET CMP0075 NEW )
  25. # ~~~~~~~~~~~~~~~~~
  26. # Build Information
  27. # ~~~~~~~~~~~~~~~~~
  28. # The type of build this is ( 0 => alpha ; 1 => beta ; 2 => release )
  29. # If set to non-release build it changes the welcome screen
  30. # If set to non-alpha build it disables the development only menu
  31. set( AUDACITY_BUILD_LEVEL 0 )
  32. # Define Tenacity's build output name
  33. if( APPLE OR WIN32 )
  34. set( AUDACITY_NAME "Tenacity")
  35. else()
  36. set( AUDACITY_NAME "tenacity")
  37. endif()
  38. if(NOT GIT_FOUND)
  39. find_package( Git )
  40. endif()
  41. set( AUDACITY_VERSION 0 ) # Major version
  42. set( AUDACITY_RELEASE 0 ) # Minor version
  43. set( AUDACITY_REVISION 0 ) # Revision version
  44. set( AUDACITY_MODLEVEL 0 ) # Additional version detail
  45. set( GIT_DESCRIBE "unknown" )
  46. if( GIT_FOUND )
  47. execute_process(
  48. COMMAND ${GIT_EXECUTABLE} describe --abbrev=7
  49. WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
  50. OUTPUT_VARIABLE GIT_DESCRIBE
  51. OUTPUT_STRIP_TRAILING_WHITESPACE ERROR_QUIET
  52. )
  53. if( GIT_DESCRIBE )
  54. # Copy to new variable for string manipulation
  55. set( git_output ${GIT_DESCRIBE} )
  56. # TODO: Remove this after first Tenacity release
  57. string( REPLACE "Audacity-" "" git_output "${git_output}" )
  58. string( REGEX REPLACE "-.*" "" git_output "${git_output}" )
  59. string( REPLACE "." ";" git_output "${git_output}" )
  60. list( GET git_output 0 AUDACITY_VERSION )
  61. list( GET git_output 1 AUDACITY_RELEASE )
  62. list( GET git_output 2 AUDACITY_REVISION )
  63. endif()
  64. endif()
  65. # ~~~~~~~
  66. # Vcpkg
  67. # ~~~~~~~
  68. if( WIN32 OR APPLE )
  69. option( VCPKG "Use vcpkg for dependencies" ON )
  70. else()
  71. option( VCPKG "Use vcpkg for dependencies" OFF )
  72. endif()
  73. if( VCPKG )
  74. set( ENV{VCPKG_DISABLE_METRICS} true )
  75. if( NOT DEFINED ENV{VCPKG_BINARY_SOURCES} )
  76. set( ENV{VCPKG_BINARY_SOURCES} "clear;default,readwrite;nuget,https://tenacityteam.jfrog.io/artifactory/api/nuget/tenacity-nuget,read" )
  77. endif()
  78. set( ENV{VCPKG_FEATURE_FLAGS} "-compilertracking,manifests,registries,versions" )
  79. if( VCPKG_ROOT )
  80. message( STATUS "Using dependencies from vcpkg repository at ${VCPKG_ROOT}" )
  81. if( NOT EXISTS "${VCPKG_ROOT}/bootstrap-vcpkg.sh" )
  82. message( FATAL_ERROR "${VCPKG_ROOT} is not a vcpkg Git repository." )
  83. endif()
  84. else()
  85. message( STATUS "Using dependencies from vcpkg Git submodule" )
  86. set( VCPKG_ROOT "${CMAKE_SOURCE_DIR}/vcpkg" )
  87. if( NOT EXISTS "${VCPKG_ROOT}/bootstrap-vcpkg.sh" )
  88. # Make sure we have actually attempted to find Git
  89. if( NOT GIT_FOUND )
  90. find_package( Git )
  91. endif()
  92. if( GIT_FOUND )
  93. message( STATUS "Initializing vcpkg Git submodule" )
  94. execute_process(
  95. COMMAND ${GIT_EXECUTABLE} submodule init
  96. WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
  97. )
  98. execute_process(
  99. COMMAND ${GIT_EXECUTABLE} submodule update
  100. WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
  101. )
  102. else()
  103. message( FATAL_ERROR "Unable to initialize vcpkg Git submodule because CMake was unable to find a git installation" )
  104. endif()
  105. endif()
  106. endif()
  107. if( NOT DEFINED VCPKG_OVERLAY_PORTS )
  108. set( VCPKG_OVERLAY_PORTS "${VCPKG_ROOT}/overlay/ports" )
  109. endif()
  110. if( NOT DEFINED VCPKG_OVERLAY_TRIPLETS )
  111. set( VCPKG_OVERLAY_TRIPLETS "${VCPKG_ROOT}/overlay/triplets" )
  112. endif()
  113. if( NOT DEFINED ENV{VCPKG_DEFAULT_TRIPLET} AND NOT DEFINED VCPKG_TARGET_TRIPLET )
  114. if( APPLE )
  115. set( VCPKG_TARGET_TRIPLET "x64-osx-10.12min" )
  116. endif()
  117. elseif( DEFINED ENV{VCPKG_DEFAULT_TRIPLET} )
  118. set( VCPKG_TARGET_TRIPLET "$ENV{VCPKG_DEFAULT_TRIPLET}" )
  119. endif()
  120. set( CMAKE_TOOLCHAIN_FILE "${VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" )
  121. else()
  122. message( STATUS "Searching for dependencies from system, not using vcpkg." )
  123. endif()
  124. # ~~~~~~~~~~~~~~~~~~~~~~
  125. # CMake input validation
  126. # ~~~~~~~~~~~~~~~~~~~~~~
  127. # Don't allow in-source builds
  128. if( "${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}" )
  129. message( SEND_ERROR "In-source builds not allowed" )
  130. message( SEND_ERROR "Create a new directory and run cmake from there, i.e.:" )
  131. message( SEND_ERROR " mkdir build" )
  132. message( SEND_ERROR " cmake -B build" )
  133. message( SEND_ERROR "You will need to delete CMakeCache.txt and CMakeFiles from this directory to clean up." )
  134. message( FATAL_ERROR "Failed because you attempted to build in the source tree" )
  135. endif()
  136. # Determine if this is being generated by a multi-config CMake generator
  137. get_property( IS_MULTI_CONFIG GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG )
  138. # If the user has not provided us with the build target then we generate sensible defaults
  139. if( NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES )
  140. if( IS_MULTI_CONFIG )
  141. message( STATUS "Detected that we are using a multi-config generator without build types defined..." )
  142. message( STATUS "To fix this we are using default values for CMAKE_CONFIGURATION_TYPES" )
  143. set( CMAKE_CONFIGURATION_TYPES "Debug;MinSizeRel;Release;RelWithDebInfo" )
  144. else()
  145. message( STATUS "Detected that we are using a single config generator without a build type defined..." )
  146. message( STATUS "To fix this we are using default value for CMAKE_BUILD_TYPE" )
  147. set( CMAKE_BUILD_TYPE "Debug" )
  148. endif()
  149. endif()
  150. # If the user has provided us with duplicate config definitions use the singular build type
  151. if( CMAKE_BUILD_TYPE AND CMAKE_CONFIGURATION_TYPES )
  152. message( STATUS "Using CMAKE_BUILD_TYPE and ignoring CMAKE_CONFIGURATION_TYPES" )
  153. set ( CMAKE_CONFIGURATION_TYPES )
  154. endif()
  155. # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  156. # Definitions that must happen before the project() command
  157. # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  158. if( APPLE )
  159. # These values are used within builds on MacOS to link the target
  160. # version of the SDK if the linker supports platform versioning
  161. set( MIN_MACOS_VERSION 10.12 )
  162. # Target 10.13 to prevent high CPU usage and slow drawing on Mojave or newer
  163. set( TARGET_MACOS_VERSION 10.13 )
  164. # Define the OSX compatibility parameters
  165. set( CMAKE_OSX_ARCHITECTURES x86_64 CACHE INTERNAL "" )
  166. set( CMAKE_OSX_DEPLOYMENT_TARGET ${MIN_MACOS_VERSION} CACHE INTERNAL "" )
  167. set( CMAKE_OSX_SYSROOT macosx CACHE INTERNAL "" )
  168. endif()
  169. # Add our module path
  170. set( AUDACITY_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake-proxies/cmake-modules" )
  171. set( CMAKE_MODULE_PATH ${AUDACITY_MODULE_PATH} ${CMAKE_BINARY_DIR} ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake-modules" )
  172. set( CMAKE_PREFIX_PATH ${CMAKE_BINARY_DIR} ${CMAKE_PREFIX_PATH} )
  173. # ~~~~~~~~~~~~~~
  174. # C++ standard
  175. # ~~~~~~~~~~~~~~
  176. # Set the required C++ standard
  177. set( CMAKE_CXX_STANDARD 17 )
  178. set( CMAKE_CXX_STANDARD_REQUIRED ON )
  179. # List of defines which are intended to silence C++17 warnings
  180. # These will be added to each CMAKE target as PRIVATE compilation definitions
  181. list( APPEND CXX_WARNINGS_SILENCE_DEFINES _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING=1 )
  182. list( APPEND CXX_WARNINGS_SILENCE_DEFINES _SILENCE_CXX17_NEGATORS_DEPRECATION_WARNING=1 )
  183. # ~~~~~~~~~~~~~~~~~~
  184. # Tenacity project
  185. # ~~~~~~~~~~~~~~~~~~
  186. project( Tenacity )
  187. # Load our functions/macros
  188. include( AudacityFunctions )
  189. set_from_env( AUDACITY_ARCH_LABEL ) # e.g. x86_64
  190. # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  191. # Configure optional settings
  192. # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  193. # Pull all the modules we'll need
  194. include( CheckCXXCompilerFlag )
  195. include( CheckIncludeFile )
  196. include( CheckIncludeFiles )
  197. include( CheckLibraryExists )
  198. include( CheckSymbolExists )
  199. include( CheckTypeSize )
  200. include( CMakeDetermineASM_NASMCompiler )
  201. include( CMakePushCheckState )
  202. include( GNUInstallDirs )
  203. include( TestBigEndian )
  204. # Generator specific configurations
  205. if( CMAKE_GENERATOR MATCHES "Visual Studio*" )
  206. # Make sure Tenacity is the startup project
  207. set_directory_properties( PROPERTIES VS_STARTUP_PROJECT "${CMAKE_PROJECT_NAME}" )
  208. # Define system library information, but we'll do the install
  209. set( CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP YES )
  210. set( CMAKE_INSTALL_UCRT_LIBRARIES NO )
  211. set( CMAKE_INSTALL_MFC_LIBRARIES NO )
  212. set( CMAKE_INSTALL_OPENMP_LIBRARIES NO )
  213. include( InstallRequiredSystemLibraries )
  214. elseif( CMAKE_GENERATOR MATCHES "Xcode" )
  215. # Generate schema files
  216. set( CMAKE_XCODE_GENERATE_SCHEME ON )
  217. # Tell XCode to use a blank code signing identity
  218. set( CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "" CACHE INTERNAL "" )
  219. # This prevents a link error when building with the 10.9 or older SDKs
  220. set( CMAKE_XCODE_ATTRIBUTE_CLANG_LINK_OBJC_RUNTIME OFF )
  221. endif()
  222. # Organize subdirectories/targets into folders for the IDE generators
  223. set_property( GLOBAL PROPERTY USE_FOLDERS ON )
  224. # Enable inter-procedural optimization if this compiler supports it
  225. # This must appear after the project declaration so it can detect ENABLED_LANGUAGES
  226. include( CheckIPOSupported )
  227. check_ipo_supported( RESULT IPO_SUPPORTED OUTPUT IPO_OUTPUT )
  228. mark_as_advanced( FORCE IPO_SUPPORTED )
  229. if( IPO_SUPPORTED )
  230. set( CMAKE_INTERPROCEDURAL_OPTIMIZATION ON )
  231. set( CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE ON )
  232. set( CMAKE_INTERPROCEDURAL_OPTIMIZATION_DEBUG OFF )
  233. add_definitions( -DHAVE_IPO )
  234. message( STATUS "Inter-procedural optimization is supported" )
  235. else()
  236. message( STATUS "Inter-procedural optimization is not supported: ${IPO_OUTPUT}" )
  237. endif()
  238. # Attempt to find optional ccache program
  239. find_program( CCACHE_PROGRAM ccache )
  240. mark_as_advanced( FORCE CCACHE_PROGRAM )
  241. if( NOT "${CCACHE_PROGRAM}" STREQUAL "CCACHE_PROGRAM-NOTFOUND" )
  242. option( CCACHE "Use ccache for compiler caching to speed up rebuilds." ON )
  243. endif()
  244. # Attempt to find optional sccache program
  245. find_program( SCCACHE_PROGRAM sccache )
  246. mark_as_advanced( FORCE SCCACHE_PROGRAM )
  247. if( NOT "${SCCACHE_PROGRAM}" STREQUAL "SCCACHE_PROGRAM-NOTFOUND" )
  248. option( SCCACHE "Use sccache for compiler caching to speed up rebuilds." ON )
  249. endif()
  250. # Prefer sccache if both ccache and sccache are found
  251. if( SCCACHE )
  252. message( STATUS "Using sccache for compiler caching to speed up rebuilds" )
  253. set( CMAKE_C_COMPILER_LAUNCHER "${SCCACHE_PROGRAM}" )
  254. set( CMAKE_CXX_COMPILER_LAUNCHER "${SCCACHE_PROGRAM}" )
  255. # Instruct MSVC to generate symbolic debug information within object files for sccache
  256. if( CMAKE_CXX_COMPILER_ID MATCHES "MSVC" )
  257. if( IS_MULTI_CONFIG )
  258. foreach( config ${CMAKE_CONFIGURATION_TYPES} )
  259. string( TOUPPER "${config}" config )
  260. string( REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_${config} "${CMAKE_CXX_FLAGS_${config}}" )
  261. string( REPLACE "/Zi" "/Z7" CMAKE_C_FLAGS_${config} "${CMAKE_C_FLAGS_${config}}" )
  262. endforeach()
  263. else()
  264. string( REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE} "${CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE}}" )
  265. string( REPLACE "/Zi" "/Z7" CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE} "${CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE}}" )
  266. endif()
  267. endif()
  268. elseif( CCACHE AND NOT WIN32 )
  269. # Don't use ccache on Windows because it is probably mingw and it will muck things up
  270. message( STATUS "Using ccache for compiler caching to speed up rebuilds" )
  271. set( CMAKE_C_COMPILER_LAUNCHER "${CCACHE_PROGRAM}" )
  272. set( CMAKE_CXX_COMPILER_LAUNCHER "${CCACHE_PROGRAM}" )
  273. else()
  274. if( WIN32 )
  275. message( STATUS "No compiler caching enabled. Install sccache to enable compiler caching." )
  276. else()
  277. message( STATUS "No compiler caching enabled. Install sccache or ccache to enable compiler caching." )
  278. endif()
  279. endif()
  280. # Determine total number of processors to enable us to only use total_available - 2 processors
  281. # This helps prevent slow down of the other applications during the build process
  282. if( NOT DISABLE_AUTO_CPU_COUNT_OPT )
  283. include( ProcessorCount )
  284. ProcessorCount( CMAKE_BUILD_CPU_COUNT )
  285. if( CMAKE_BUILD_CPU_COUNT GREATER 0 )
  286. math( EXPR CMAKE_BUILD_CPU_COUNT "${CMAKE_BUILD_CPU_COUNT} - 2" OUTPUT_FORMAT DECIMAL )
  287. endif()
  288. if( CMAKE_BUILD_CPU_COUNT LESS_EQUAL 0 )
  289. message( WARNING "Unable to optimize build CPU usage, defaulting to use all processors" )
  290. set( CMAKE_BUILD_CPU_COUNT 0 )
  291. elseif( NOT DEFINED CMAKE_BUILD_PARALLEL_LEVEL )
  292. message( STATUS "Build automatically optimized to use processor count: ${CMAKE_BUILD_CPU_COUNT}" )
  293. set( CMAKE_BUILD_PARALLEL_LEVEL ${CMAKE_BUILD_CPU_COUNT} )
  294. endif()
  295. if( CMAKE_CXX_COMPILER_ID MATCHES "MSVC" )
  296. set( MULTI_PROC_COMPILER_FLAG "/MP" )
  297. elseif( CMAKE_CXX_COMPILER_ID MATCHES "AppleClang|Clang|GNU" )
  298. set( MULTI_PROC_COMPILER_FLAG "-j" )
  299. endif()
  300. if( IS_MULTI_CONFIG AND CMAKE_CONFIGURATION_TYPES )
  301. foreach( config ${CMAKE_CONFIGURATION_TYPES} )
  302. string( TOUPPER "${config}" config )
  303. if( NOT CMAKE_BUILD_CPU_COUNT EQUAL 0 )
  304. string( APPEND CMAKE_C_FLAGS_${config} " ${MULTI_PROC_COMPILER_FLAG}${CMAKE_BUILD_CPU_COUNT}" )
  305. string( APPEND CMAKE_CXX_FLAGS_${config} " ${MULTI_PROC_COMPILER_FLAG}${CMAKE_BUILD_CPU_COUNT}" )
  306. else()
  307. string( APPEND CMAKE_C_FLAGS_${config} " ${MULTI_PROC_COMPILER_FLAG}" )
  308. string( APPEND CMAKE_CXX_FLAGS_${config} " ${MULTI_PROC_COMPILER_FLAG}" )
  309. endif()
  310. endforeach()
  311. elseif( CMAKE_BUILD_TYPE )
  312. if( NOT CMAKE_BUILD_CPU_COUNT EQUAL 0 )
  313. string( APPEND CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE} " ${MULTI_PROC_COMPILER_FLAG}${CMAKE_BUILD_CPU_COUNT}" )
  314. string( APPEND CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE} " ${MULTI_PROC_COMPILER_FLAG}${CMAKE_BUILD_CPU_COUNT}" )
  315. else()
  316. string( APPEND CMAKE_C_FLAGS_${CMAKE_BUILD_TYPE} " ${MULTI_PROC_COMPILER_FLAG}" )
  317. string( APPEND CMAKE_CXX_FLAGS_${CMAKE_BUILD_TYPE} " ${MULTI_PROC_COMPILER_FLAG}" )
  318. endif()
  319. endif()
  320. endif()
  321. # Determine 32-bit or 64-bit target
  322. if( CMAKE_C_COMPILER_ID MATCHES "MSVC" AND CMAKE_VS_PLATFORM_NAME MATCHES "Win64|x64" )
  323. set( IS_64BIT ON )
  324. elseif( CMAKE_SIZEOF_VOID_P STREQUAL "8" )
  325. set( IS_64BIT ON )
  326. endif()
  327. # Determine 32-bit or 64-bit host
  328. cmake_host_system_information( RESULT IS_64BIT_HOST QUERY "IS_64BIT" )
  329. # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  330. # Output debugging information
  331. # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  332. message( STATUS "Build Info:" )
  333. message( STATUS "\tHost System Name: ${CMAKE_HOST_SYSTEM_NAME}" )
  334. message( STATUS "\tHost System Version: ${CMAKE_HOST_SYSTEM_VERSION}" )
  335. message( STATUS "\tHost System Processor: ${CMAKE_HOST_SYSTEM_PROCESSOR}" )
  336. if( IS_64BIT_HOST )
  337. message( STATUS "\tHost System Arch: 64-bit" )
  338. else()
  339. message( STATUS "\tHost System Arch: 32-bit" )
  340. endif()
  341. message( STATUS )
  342. message( STATUS "\tTarget System Name: ${CMAKE_SYSTEM_NAME}" )
  343. message( STATUS "\tTarget System Version: ${CMAKE_SYSTEM_VERSION}" )
  344. message( STATUS "\tTarget System Processor: ${CMAKE_SYSTEM_PROCESSOR}" )
  345. if( IS_64BIT )
  346. message( STATUS "\tTarget System Arch: 64-bit" )
  347. else()
  348. message( STATUS "\tTarget System Arch: 32-bit" )
  349. endif()
  350. message( STATUS )
  351. message( STATUS "\tCompiler: ${CMAKE_CXX_COMPILER}" )
  352. message( STATUS "\tCompiler Version: ${CMAKE_CXX_COMPILER_VERSION}" )
  353. message( STATUS "\tCompiler Standard: ${CMAKE_CXX_STANDARD}" )
  354. message( STATUS "\tCompiler Standard Required: ${CMAKE_CXX_STANDARD_REQUIRED}" )
  355. message( STATUS "\tCompiler Extensions: ${CMAKE_CXX_EXTENSIONS}" )
  356. message( STATUS )
  357. if( MSVC )
  358. message( STATUS "\tMSVC Version: ${MSVC_VERSION}" )
  359. message( STATUS "\tMSVC Toolset: ${MSVC_TOOLSET_VERSION}" )
  360. endif()
  361. if( CMAKE_GENERATOR MATCHES "Xcode" )
  362. message( STATUS "\tXcode Version: ${XCODE_VERSION}" )
  363. endif()
  364. if( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
  365. message( STATUS "\tMacOS SDK: ${CMAKE_OSX_SYSROOT}" )
  366. endif()
  367. message( STATUS )
  368. message( STATUS "\tCurrent Commit: ${GIT_DESCRIBE}" )
  369. message( STATUS )
  370. # ~~~~~~~~~~~~~~
  371. # Output paths
  372. # ~~~~~~~~~~~~~~
  373. set( _SHARED_PROXY_BASE "shared" )
  374. set( _SHARED_PROXY_BASE_PATH "${CMAKE_BINARY_DIR}/${_SHARED_PROXY_BASE}" )
  375. # Define the non-install and executable paths and where the final product is stored
  376. if( IS_MULTI_CONFIG AND CMAKE_CONFIGURATION_TYPES )
  377. set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin )
  378. set( _DESTDIR "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}" )
  379. set( _SHARED_PROXY_PATH "${_SHARED_PROXY_BASE_PATH}/${CMAKE_CFG_INTDIR}" )
  380. else()
  381. set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE} )
  382. set( _DESTDIR "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/" )
  383. set( _SHARED_PROXY_PATH "${_SHARED_PROXY_BASE_PATH}/${CMAKE_BUILD_TYPE}" )
  384. endif()
  385. set( _DEST "${_DESTDIR}" )
  386. set( _PREFIX "${CMAKE_INSTALL_PREFIX}" )
  387. set( _LIBDIR "${CMAKE_INSTALL_LIBDIR}" )
  388. set( _DATADIR "${CMAKE_INSTALL_DATADIR}" )
  389. set( _PKGLIB "${_LIBDIR}/tenacity" )
  390. set( _PKGDATA "${_DATADIR}/tenacity/" )
  391. set( _MANDIR "${CMAKE_INSTALL_MANDIR}" )
  392. set( _MODDIR "${_DEST}/modules" )
  393. set( _EXEDIR "${_DEST}" )
  394. # Setup RPATH handling
  395. set( CMAKE_BUILD_RPATH "${_DEST}/${_PKGLIB}" )
  396. set( CMAKE_BUILD_WITH_INSTALL_RPATH FALSE )
  397. set( CMAKE_INSTALL_RPATH "${_PREFIX}/${_PKGLIB}" )
  398. set( CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE )
  399. # Adjust them for the Mac
  400. if( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
  401. set( _APPDIR "Tenacity.app/Contents" )
  402. set( _DEST "${_DESTDIR}/${_APPDIR}" )
  403. set( _EXEDIR "${_DEST}/MacOS" )
  404. set( _MODDIR "${_DEST}/modules" )
  405. set( _PKGLIB "${_DEST}/Frameworks" )
  406. set( CMAKE_MACOSX_RPATH OFF )
  407. endif()
  408. # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  409. # Add optional capability expanding libraries if we can find them
  410. # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  411. check_library_exists( m pow "" HAVE_LIBM )
  412. check_library_exists( atomic __atomic_fetch_add_4 "" HAVE_LIBATOMIC )
  413. # Add the math library( if found ) to the list of required libraries so that later checks will be able to see it
  414. if( HAVE_LIBM )
  415. list( APPEND CMAKE_REQUIRED_LIBRARIES -lm )
  416. endif()
  417. # Add the atomic library( if found ) to the list of required libraries so that later checks will be able to see it
  418. if( HAVE_LIBATOMIC )
  419. list( APPEND CMAKE_REQUIRED_LIBRARIES -latomic )
  420. endif()
  421. # Add the dynamic linker library( if needed ) to the list of required libraries
  422. list( APPEND CMAKE_REQUIRED_LIBRARIES ${CMAKE_DL_LIBS} )
  423. # Make sure we link required libraries
  424. set( CMAKE_LINK_INTERFACE_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} )
  425. # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  426. # Check supported compile-time features
  427. # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  428. # Various common checks whose results are used by the different targets
  429. test_big_endian( WORDS_BIGENDIAN )
  430. # Check for MMX and SSE support
  431. set( MMX_FLAG "" CACHE INTERNAL "" )
  432. set( SSE_FLAG "" CACHE INTERNAL "" )
  433. if( CMAKE_CXX_COMPILER_ID MATCHES "AppleClang|Clang|GNU" )
  434. check_cxx_compiler_flag( "-mmmx" HAVE_MMX )
  435. if( HAVE_MMX AND NOT IS_64BIT )
  436. set( MMX_FLAG "-mmmx" CACHE INTERNAL "" )
  437. endif()
  438. check_cxx_compiler_flag( "-msse" HAVE_SSE )
  439. if( HAVE_SSE AND NOT IS_64BIT )
  440. set( SSE_FLAG "-msse" CACHE INTERNAL "" )
  441. endif()
  442. check_cxx_compiler_flag( "-msse2" HAVE_SSE2 )
  443. if( HAVE_SSE2 AND NOT IS_64BIT )
  444. set( SSE_FLAG "-msse2" CACHE INTERNAL "" )
  445. endif()
  446. elseif( CMAKE_CXX_COMPILER_ID MATCHES "MSVC" )
  447. set( HAVE_MMX ON )
  448. set( HAVE_SSE ON )
  449. set( HAVE_SSE2 ON )
  450. if( NOT IS_64BIT )
  451. set( SSE_FLAG "/arch:SSE2" )
  452. endif()
  453. endif()
  454. check_include_files( "float.h;stdarg.h;stdlib.h;string.h" STDC_HEADERS )
  455. check_include_file( "assert.h" HAVE_ASSERT_H )
  456. check_include_file( "errno.h" HAVE_ERRNO_H )
  457. check_include_file( "fcntl.h" HAVE_FCNTL_H )
  458. check_include_file( "fenv.h" HAVE_FENV_H )
  459. check_include_file( "inttypes.h" HAVE_INTTYPES_H )
  460. check_include_file( "limits.h" HAVE_LIMITS_H )
  461. if( CMAKE_SYSTEM_NAME MATCHES "FreeBSD" )
  462. check_include_file( "stdlib.h" HAVE_MALLOC_H )
  463. check_include_file( "sys/endian.h" HAVE_ENDIAN_H )
  464. else()
  465. check_include_file( "malloc.h" HAVE_MALLOC_H )
  466. check_include_file( "byteswap.h" HAVE_BYTESWAP_H )
  467. endif()
  468. check_include_file( "memory.h" HAVE_MEMORY_H )
  469. check_include_file( "stdbool.h" HAVE_STDBOOL_H )
  470. check_include_file( "stdint.h" HAVE_STDINT_H )
  471. check_include_file( "stdlib.h" HAVE_STDLIB_H )
  472. check_include_file( "string.h" HAVE_STRING_H )
  473. check_include_file( "strings.h" HAVE_STRINGS_H )
  474. check_include_file( "unistd.h" HAVE_UNISTD_H )
  475. check_include_file( "xmmintrin.h" HAVE_XMMINTRIN_H )
  476. check_include_file( "sys/param.h" HAVE_SYS_PARAM_H )
  477. check_include_file( "sys/stat.h" HAVE_SYS_STAT_H )
  478. check_include_file( "sys/types.h" HAVE_SYS_TYPES_H )
  479. check_include_file( "sys/wait.h" HAVE_SYS_WAIT_H )
  480. check_symbol_exists( bcopy "strings.h" HAVE_BCOPY )
  481. check_symbol_exists( fileno "stdio.h" HAVE_FILENO )
  482. check_symbol_exists( flock "sys/file.h" HAVE_FLOCK )
  483. check_symbol_exists( fork "unistd.h" HAVE_FORK )
  484. check_symbol_exists( fsync "unistd.h" HAVE_FSYNC )
  485. check_symbol_exists( ftruncate "unistd.h" HAVE_FTRUNCATE )
  486. check_symbol_exists( getpagesize "unistd.h" HAVE_GETPAGESIZE )
  487. check_symbol_exists( gettimeofday "sys/time.h" HAVE_GETTIMEOFDAY )
  488. check_symbol_exists( gmtime "time.h" HAVE_GMTIME )
  489. check_symbol_exists( gmtime_r "time.h" HAVE_GMTIME_R )
  490. check_symbol_exists( lrint "math.h" HAVE_LRINT )
  491. check_symbol_exists( lrintf "math.h" HAVE_LRINTF )
  492. check_symbol_exists( lround "math.h" HAVE_LROUND )
  493. check_symbol_exists( lstat "sys/stat.h" HAVE_LSTAT )
  494. check_symbol_exists( memcpy "string.h" HAVE_MEMCPY )
  495. check_symbol_exists( memmove "string.h" HAVE_MEMMOVE )
  496. check_symbol_exists( mlock "sys/mman.h" HAVE_MLOCK )
  497. check_symbol_exists( pipe "unistd.h" HAVE_PIPE )
  498. check_symbol_exists( posix_fadvise "fcntl.h" HAVE_POSIX_FADVISE )
  499. check_symbol_exists( posix_memalign "stdlib.h" HAVE_POSIX_MEMALIGN )
  500. check_symbol_exists( strchr "string.h" HAVE_STRCHR )
  501. check_symbol_exists( waitpid "sys/wait.h" HAVE_WAITPID )
  502. check_type_size( "int8_t" SIZEOF_INT8 LANGUAGE C )
  503. check_type_size( "int16_t" SIZEOF_INT16 LANGUAGE C )
  504. check_type_size( "uint16_t" SIZEOF_UINT16 LANGUAGE C )
  505. check_type_size( "u_int16_t" SIZEOF_U_INT16 LANGUAGE C )
  506. check_type_size( "int32_t" SIZEOF_INT32 LANGUAGE C )
  507. check_type_size( "uint32_t" SIZEOF_UINT32 LANGUAGE C )
  508. check_type_size( "u_int32_t" SIZEOF_U_INT32 LANGUAGE C )
  509. check_type_size( "int64_t" SIZEOF_INT64 LANGUAGE C )
  510. check_type_size( "short" SIZEOF_SHORT LANGUAGE C )
  511. check_type_size( "unsigned short" SIZEOF_UNSIGNED_SHORT LANGUAGE C )
  512. check_type_size( "int" SIZEOF_INT LANGUAGE C )
  513. check_type_size( "unsigned int" SIZEOF_UNSIGNED_INT LANGUAGE C )
  514. check_type_size( "long" SIZEOF_LONG LANGUAGE C )
  515. check_type_size( "unsigned long" SIZEOF_UNSIGNED_LONG LANGUAGE C )
  516. check_type_size( "long long" SIZEOF_LONG_LONG LANGUAGE C )
  517. check_type_size( "unsigned long long" SIZEOF_UNSIGNED_LONG_LONG LANGUAGE C )
  518. check_type_size( "float" SIZEOF_FLOAT LANGUAGE C )
  519. check_type_size( "double" SIZEOF_DOUBLE LANGUAGE C )
  520. check_type_size( "long double" SIZEOF_LONG_DOUBLE LANGUAGE C )
  521. check_type_size( "loff_t" SIZEOF_LOFF LANGUAGE C )
  522. check_type_size( "off_t" SIZEOF_OFF LANGUAGE C )
  523. check_type_size( "off64_t" SIZEOF_OFF64 LANGUAGE C )
  524. check_type_size( "size_t" SIZEOF_SIZE LANGUAGE C )
  525. check_type_size( "wchar_t" SIZEOF_WCHAR LANGUAGE C )
  526. check_type_size( "void*" SIZEOF_POINTER LANGUAGE C )
  527. # ~~~~~~~~~~~~~~~~~~~~
  528. # 3rd party Libraries
  529. # ~~~~~~~~~~~~~~~~~~~~
  530. # We'll be using it if it's available
  531. find_package( PkgConfig QUIET )
  532. # Mostly just to make the CMP0072 policy happy
  533. find_package( OpenGL QUIET )
  534. # Initialize the lib and lib64 directories
  535. if( NOT EXISTS "${CMAKE_BINARY_DIR}/lib" )
  536. file( MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/lib" )
  537. endif()
  538. # Create symbolic link to use the lib directory contents on 64-bit targets
  539. if( NOT CMAKE_INSTALL_LIBDIR STREQUAL "lib" AND NOT EXISTS "${CMAKE_BINARY_DIR}/lib64" )
  540. file( CREATE_LINK "${CMAKE_BINARY_DIR}/lib" "${CMAKE_BINARY_DIR}/lib64" SYMBOLIC )
  541. endif()
  542. # Python is used for the manual and( possibly ) message catalogs
  543. find_package( Python3 )
  544. if( Python3_FOUND )
  545. set( PYTHON "${Python3_EXECUTABLE}" )
  546. elseif( CMAKE_SYSTEM_NAME MATCHES "Windows" )
  547. # This is an odd case now, as Conan requires Python as well
  548. nuget_package( pkgdir "python3" "3.7.7" )
  549. file( TO_NATIVE_PATH "${pkgdir}/tools/python.exe" PYTHON )
  550. endif()
  551. # Define the EXPERIMENTAL flags Do this before consistency checks for added third-party libraries
  552. include( "src/Experimental.cmake" )
  553. include( CMakeDependentOption )
  554. find_package( Threads REQUIRED )
  555. find_package( ZLIB REQUIRED )
  556. find_package( EXPAT REQUIRED )
  557. find_package( mp3lame REQUIRED )
  558. find_package( SndFile REQUIRED )
  559. find_package( Soxr REQUIRED )
  560. find_package( SQLite3 REQUIRED )
  561. find_package( PortAudio REQUIRED )
  562. find_package( PortMidi )
  563. find_package( PortSMF )
  564. cmake_dependent_option( MIDI "MIDI support requires PortMidi and PortSMF." ON "PortMidi_FOUND;PortSMF_FOUND" OFF )
  565. if( MIDI )
  566. set( USE_MIDI ON )
  567. message( STATUS "MIDI support enabled." )
  568. else()
  569. message( STATUS "MIDI support disabled. Requires both PortMidi and PortSMF." )
  570. endif()
  571. find_package( id3tag )
  572. cmake_dependent_option( ID3TAG "ID3 Tag support for MP3s." ON "id3tag_FOUND" OFF )
  573. if( ID3TAG )
  574. set( USE_LIBID3TAG ON )
  575. message( STATUS "ID3 tag support for MP3s enabled." )
  576. else()
  577. message( STATUS "ID3 tag support for MP3s disabled. Requires libid3tag." )
  578. endif()
  579. find_package( MAD )
  580. cmake_dependent_option( MP3_DECODING "MP3 decoding support with libmad" ON "MAD_FOUND" OFF )
  581. if( MP3_DECODING )
  582. set( USE_LIBMAD ON )
  583. message( STATUS "MP3 decoding support enabled." )
  584. else()
  585. message( STATUS "MP3 decoding support disabled. Requires libmad." )
  586. endif()
  587. find_package( libtwolame )
  588. cmake_dependent_option( MP2_ENCODING "MP2 support with Twolame" ON "libtwolame_FOUND" OFF )
  589. if( MP2_ENCODING )
  590. set( USE_LIBTWOLAME ON )
  591. message( STATUS "MP2 encoding support enabled." )
  592. else()
  593. message( STATUS "MP2 encoding support disabled. Requires Twolame library." )
  594. endif()
  595. find_package( Ogg )
  596. cmake_dependent_option( OGG "OGG container format support" ON "Ogg_FOUND" OFF )
  597. if( OGG )
  598. set( USE_LIBOGG ON )
  599. message( STATUS "OGG container format support enabled." )
  600. else()
  601. message( STATUS "OGG container format support disabled. Requires libogg." )
  602. endif()
  603. find_package( Vorbis )
  604. cmake_dependent_option( VORBIS "Vorbis codec support" ON "Vorbis_FOUND" OFF )
  605. if( VORBIS )
  606. set( USE_LIBVORBIS ON )
  607. message( STATUS "Vorbis codec support enabled." )
  608. else()
  609. message( STATUS "Voribs codec support disabled. Requires libvorbis." )
  610. endif()
  611. find_package( FLAC++ )
  612. cmake_dependent_option( FLAC "FLAC codec support" ON "FLAC++_FOUND" OFF )
  613. if( FLAC )
  614. set( USE_LIBFLAC ON )
  615. message( STATUS "FLAC codec support enabled." )
  616. else()
  617. message( STATUS "FLAC codec support disabled. Requires libflac and libflac++ C++ bindings." )
  618. endif()
  619. find_package(sbsms)
  620. cmake_dependent_option(SBSMS "SBSMS timestretching" ON "sbsms_FOUND" OFF)
  621. if(SBSMS)
  622. set(USE_SBSMS ON)
  623. message(STATUS "SBSMS timestretching support enabled.")
  624. else()
  625. message( STATUS "SBSMS timestretching support disabled. Requires libsbsms." )
  626. endif()
  627. find_package( SoundTouch )
  628. cmake_dependent_option( SOUNDTOUCH "SoundTouch timestretching" ON "SoundTouch_FOUND" OFF )
  629. if( SOUNDTOUCH )
  630. set( USE_SOUNDTOUCH ON )
  631. message( STATUS "SoundTouch timestretching support enabled." )
  632. else()
  633. message( STATUS "SoundTouch timestretching support disabled. Requires SoundTouch library." )
  634. endif()
  635. find_package( FFMPEG )
  636. cmake_dependent_option( FFMPEG "FFMPEG codecs support." ON "FFMPEG_FOUND" OFF )
  637. if( FFMPEG )
  638. set( USE_FFMPEG ON )
  639. message( STATUS "FFMPEG codecs support enabled." )
  640. else()
  641. message( STATUS "FFMPEG codecs support disabled. Requires FFMPEG libraries." )
  642. endif()
  643. find_package( VampHostSDK )
  644. cmake_dependent_option( VAMP "VAMP plugin hosting." ON "VampHostSDK_FOUND" OFF )
  645. if( VAMP )
  646. set( USE_VAMP ON )
  647. message( STATUS "VAMP plugin hosting enabled. Requires VAMP host SDK." )
  648. else()
  649. message( STATUS "VAMP plugin hosting disabled." )
  650. endif()
  651. find_package( LV2 )
  652. find_package( lilv )
  653. find_package( suil )
  654. cmake_dependent_option( LV2 "LV2 plugin host support" ON "LV2_FOUND;lilv_FOUND;suil_FOUND" OFF )
  655. if( LV2 )
  656. message( STATUS "LV2 plugin hosting enabled." )
  657. set( USE_LV2 ON )
  658. else()
  659. message( STATUS "LV2 plugin hosting disabled. Requires LV2, lilv, and suil libraries." )
  660. endif()
  661. option( VST2 "VST2 plugin host support" ON )
  662. if( VST2 )
  663. message( STATUS "VST2 plugin host support enabled." )
  664. else()
  665. message( STATUS "VST2 plugin host support disabled." )
  666. endif()
  667. if( NOT CMAKE_SYSTEM_NAME MATCHES "Darwin|Windows" )
  668. find_package( GLIB REQUIRED )
  669. find_package( GTK 3.0 REQUIRED )
  670. endif()
  671. if( NOT WIN32 )
  672. # wxWidgets 3.1 can be explicitly selected if both 3.0 and 3.1 are installed by setting
  673. # the WX_CONFIG environment variable to path of the wx-config script for 3.1.
  674. find_package(
  675. wxWidgets 3.0
  676. COMPONENTS adv base core html qa xml net
  677. )
  678. if(NOT wxWidgets_FOUND)
  679. message(FATAL_ERROR "wxWidgets NOT found. "
  680. "Install wxWidgets and its development headers and try again. "
  681. "If wxWidgets is installed, set the WX_CONFIG environment variable to the path of the wx-config script.")
  682. endif()
  683. include( ${wxWidgets_USE_FILE} )
  684. # The FindwxWidgets.cmake module does not create an IMPORT target, so hack one together. This makes it easy to add the compile definitions
  685. # to the lib-strings and lib-strings-utils targets.
  686. if( NOT TARGET wxWidgets::wxWidgets )
  687. add_library( wxWidgets::wxWidgets INTERFACE IMPORTED )
  688. target_link_libraries( wxWidgets::wxWidgets INTERFACE ${wxWidgets_LIBRARIES} )
  689. target_compile_definitions( wxWidgets::wxWidgets INTERFACE ${CXX_WARNINGS_SILENCE_DEFINES} )
  690. target_compile_definitions( wxWidgets::wxWidgets INTERFACE ${wxWidgets_DEFINITIONS} ${wxWidgets_DEFINITIONS_DEBUG} )
  691. endif()
  692. else()
  693. # On Windows we are using wxWidgets from an unmerged vcpkg branch in our vcpkg overlay https://github.com/microsoft/vcpkg/pull/17111 This
  694. # requires using 'unofficial-wxWidgets' rather than simply 'wxWidgets'. This is required for CMAKE_BUILD_TYPE=Debug to work. Refer to
  695. # https://github.com/microsoft/vcpkg/issues/18066 for background about the bug.
  696. find_package(
  697. unofficial-wxWidgets
  698. COMPONENTS adv base core html qa xml net
  699. )
  700. if( NOT TARGET wxWidgets::wxWidgets )
  701. add_library( wxWidgets::wxWidgets INTERFACE IMPORTED )
  702. target_link_libraries(
  703. wxWidgets::wxWidgets
  704. INTERFACE wx::wxadv wx::wxbase wx::wxcore wx::wxhtml wx::wxqa wx::wxxml wx::wxnet
  705. )
  706. endif()
  707. endif()
  708. add_subdirectory( lib-src/libnyquist )
  709. set( USE_NYQUIST ON )
  710. # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  711. # Tenacity source directories
  712. # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  713. add_subdirectory( "help" )
  714. add_subdirectory( "images" )
  715. add_subdirectory( "libraries" )
  716. add_subdirectory( "locale" )
  717. add_subdirectory( "src" )
  718. add_subdirectory( "modules" )
  719. add_subdirectory( "nyquist" )
  720. add_subdirectory( "plug-ins" )
  721. add_subdirectory( "scripts" )
  722. # Generate config file
  723. if( CMAKE_SYSTEM_NAME MATCHES "Windows" )
  724. configure_file( src/audacity_config.h.in src/private/configwin.h )
  725. elseif( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
  726. set( HAVE_VISIBILITY 1 )
  727. configure_file( src/audacity_config.h.in src/private/configmac.h )
  728. else()
  729. set( HAVE_VISIBILITY 1 )
  730. configure_file( src/audacity_config.h.in src/private/configunix.h )
  731. endif()
  732. # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  733. # Generate module graph information as image
  734. # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  735. # TODO: is this even needed?
  736. #[[
  737. string( JOIN "\n" GRAPH_EDGES ${GRAPH_EDGES} )
  738. # Choose edge attributes making it easy to hover at either end of edge and see a tooltip describing the edge, in svg image
  739. file( WRITE "${CMAKE_CURRENT_BINARY_DIR}/modules.dot" "digraph { graph [rankdir=LR] edge [dir=both,arrowtail=inv] \n" "${GRAPH_EDGES}" "\n}\n")
  740. execute_process( COMMAND dot -O -Tsvg "${CMAKE_CURRENT_BINARY_DIR}/modules.dot" )
  741. #]]
  742. # ~~~~~~~~~~~~
  743. # Code signing
  744. # ~~~~~~~~~~~~
  745. cmd_option( perform_codesign "Perform code signing during the install step. This only works on Windows and macOS." OFF )
  746. cmake_dependent_option( perform_notarization "Perform notarization during the install step. This only works on macOS." OFF "perform_codesign;APPLE" OFF )
  747. if( perform_codesign )
  748. include( AudacityCodeSigning )
  749. endif()
  750. # ~~~~~~~~~~
  751. # Packaging
  752. # ~~~~~~~~~~
  753. cmd_option( package_manual "Package the manual along with the DMG and InnoSetup targets" OFF )
  754. if( CMAKE_SYSTEM_NAME MATCHES "Windows" )
  755. include( AudacityInnoSetup )
  756. endif()
  757. include( Package ) # do this last