1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-01-13 16:15:48 +01:00

Reworked cmake command options

And fixed a recursion problem when copying DLLs to dest folder

The command options are now:

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

   // Use wxwidgets library [system (if available), local]
   audacity_use_wxwidgets:STRING=system
This commit is contained in:
Leland Lucius
2020-02-14 15:56:33 -06:00
parent 5501ac0fc2
commit e07b5df6f3
7 changed files with 215 additions and 97 deletions

View File

@@ -1072,11 +1072,19 @@ if( CMAKE_VERSION VERSION_GREATER_EQUAL "3.16" AND NOT CCACHE_PROGRAM )
endif()
# Handle Ladspa option
option( ${_OPT}enable_ladspa "Enable LADSPA plug-in support" ON )
set( USE_LADSPA ${${_OPT}enable_ladspa} )
cmd_option(
${_OPT}use_ladspa
"Use LADSPA plug-in support [on, off]"
ON
)
set( USE_LADSPA ${${_OPT}use_ladspa} )
# Handle VST option
option( ${_OPT}enable_vst "Enable VST2 plug-in support" ON )
cmd_option(
${_OPT}use_vst
"Use VST2 plug-in support [on, off]"
ON
)
set( USE_VST ${${_OPT}enable_vst} )
set( AUDACITY_NAME "Audacity" )
@@ -1119,7 +1127,7 @@ if( CMAKE_SYSTEM_NAME MATCHES "Windows" )
configure_file( audacity_config.h.in private/configwin.h )
# Copy over the wxWidgets DLLs
if( use_system_wxwidgets )
if( ${_OPT}use_wxwidgets STREQUAL "system" )
set( wxlibs "$ENV{WXWIN}" )
else()
set( wxlibs "${CMAKE_BINARY_DIR}" )
@@ -1144,7 +1152,7 @@ if( CMAKE_SYSTEM_NAME MATCHES "Windows" )
DEL ${dlls}
)
IF %1 EQU xyzzy (
FOR /F %%i IN ('DUMPBIN /DEPENDENTS \"%2\"\\%3 ^| FIND \" wx\"') DO (
FOR /F %%i IN ('DUMPBIN /DEPENDENTS \"%2\"\\%3 ^| findstr /B \"/C: wx\"') DO (
ECHO %%i >>\"${dlls}\"
CALL %0 xyzzy \"${libdir}\" %%i
)
@@ -1172,7 +1180,11 @@ elseif( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
set( _EXE "Audacity" )
# Handle Audio Units option
option( ${_OPT}enable_audiounits "Enable Audio Unit plug-in support" ON )
cmd_option(
${_OPT}enable_audiounits
"Enable Audio Unit plug-in support"
ON
)
set( USE_AUDIO_UNITS ${${_OPT}enable_audiounits} )
set_target_properties(
@@ -1296,7 +1308,7 @@ elseif( CMAKE_SYSTEM_NAME MATCHES "Linux|FreeBSD" )
configure_file( audacity.desktop.in ${_INTDIR}/audacity.desktop )
# Create the script to copy required wxWidgets libraries
if( NOT use_system_wxwidgets )
if( ${_OPT}use_wxwidgets STREQUAL "local" )
file( WRITE "${_INTDIR}/copy_libs.sh"
"for lib in \$(ldd ${_EXEDIR}/${_EXE} | awk '/libwx/{print \$1}')
do