From 8b184e11722423250007eab9f54339702364c4db Mon Sep 17 00:00:00 2001 From: Leland Lucius Date: Sat, 29 Feb 2020 12:41:11 -0600 Subject: [PATCH] Rework audacity.desktop file creation In 805026728ab9dab7437d6338cc4b5cac70a6cd9f, Raphael fixed a problem with the generator expressions showing up in the desktop file. But, I redid it without generator expressions altogther to get rid of null/empty mimetype entries. These probably do not matter, but it's no big deal to prevent them. --- src/CMakeLists.txt | 49 +++++++++++++++++++++++++++++++--------------- 1 file changed, 33 insertions(+), 16 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 78c98a346..209aff236 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1270,30 +1270,47 @@ else() set( HAVE_VISIBILITY 1 ) configure_file( audacity_config.h.in private/configunix.h ) - # Create the MIMETYPES list - list( APPEND MIMETYPES - $<$:audio/aac + # Build the list of mimetypes + # + # (Don't use generator expressions since it will leave null/empty + # entries in the list.) + if( USE_FFMPEG ) + list( APPEND MIMETYPES + audio/aac audio/ac3 audio/mp4 audio/x-ms-wma - video/mpeg> - $<$:audio/flac - audio/x-flac> - $<$:audio/mpeg> - $<$:audio/basic + video/mpeg + ) + endif() + if( USE_LIBFLAC ) + list( APPEND MIMETYPES + audio/flac + audio/x-flac + ) + endif() + if( USE_LIBMAD ) + list( APPEND MIMETYPES + audio/mpeg + ) + endif() + if( USE_SNDFILE ) + list( APPEND MIMETYPES + audio/basic audio/x-aiff - audio/x-wav> - $<$,$>:application/ogg - audio/x-vorbis+ogg> - ) + audio/x-wav + ) + endif() + if( USE_LIBOGG AND USE_LIBVORBIS ) + list( APPEND MIMETYPES + application/ogg + audio/x-vorbis+ogg + ) + endif() # Create the desktop file set( AUDACITY_NAME "${_EXE}" ) configure_file( audacity.desktop.in ${_INTDIR}/audacity.desktop ) - file( GENERATE - OUTPUT ${_INTDIR}/audacity.desktop - INPUT ${_INTDIR}/audacity.desktop - ) # Create the script to copy required wxWidgets libraries if( ${_OPT}use_wxwidgets STREQUAL "local" )