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.

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