diff --git a/CMakeLists.txt b/CMakeLists.txt index a62940d35..e0afcdca3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -45,6 +45,9 @@ elseif( APPLE ) set( CMAKE_OSX_SYSROOT macosx CACHE INTERNAL "" ) set( CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY "" CACHE INTERNAL "" ) + # This prevents a link error when building with the 10.9 or older SDKs + set( CMAKE_XCODE_ATTRIBUTE_CLANG_LINK_OBJC_RUNTIME OFF ) + # Shouldn't cmake do this??? string( APPEND CMAKE_CXX_FLAGS " -stdlib=libc++" ) endif() diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index c755a22a4..726f30b0f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -11,6 +11,32 @@ add_executable( ${TARGET} ) def_vars() +# Handle Audio Units option +if( CMAKE_SYSTEM_NAME MATCHES "Darwin" ) + cmd_option( + ${_OPT}use_audio_units + "Use Audio Units plug-in support [on, off]" + ON + ) + set( USE_AUDIO_UNITS ${${_OPT}use_audio_units} CACHE INTERNAL "" ) +endif() + +# Handle Ladspa option +cmd_option( + ${_OPT}use_ladspa + "Use LADSPA plug-in support [on, off]" + ON +) +set( USE_LADSPA ${${_OPT}use_ladspa} CACHE INTERNAL "" ) + +# Handle VST option +cmd_option( + ${_OPT}use_vst + "Use VST2 plug-in support [on, off]" + ON +) +set( USE_VST ${${_OPT}use_vst} CACHE INTERNAL "" ) + # # # @@ -1068,22 +1094,6 @@ if( CMAKE_VERSION VERSION_GREATER_EQUAL "3.16" AND NOT CCACHE_PROGRAM ) set( PRECOMP AudacityHeaders.h ) endif() -# Handle Ladspa option -cmd_option( - ${_OPT}use_ladspa - "Use LADSPA plug-in support [on, off]" - ON -) -set( USE_LADSPA ${${_OPT}use_ladspa} ) - -# Handle VST option -cmd_option( - ${_OPT}use_vst - "Use VST2 plug-in support [on, off]" - ON -) -set( USE_VST ${${_OPT}use_vst} ) - set( AUDACITY_NAME "Audacity" ) set( BUILDING_AUDACITY 1 ) set( INSTALL_PREFIX "${_PREFIX}" )