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.

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