mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-05 14:49:25 +02: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:
parent
5501ac0fc2
commit
e07b5df6f3
@ -384,6 +384,12 @@ macro( get_package_interface package )
|
|||||||
)
|
)
|
||||||
endmacro()
|
endmacro()
|
||||||
|
|
||||||
|
# Set the cache and context value
|
||||||
|
macro( set_cache_value var value )
|
||||||
|
set( ${var} "${value}" )
|
||||||
|
set_property( CACHE ${var} PROPERTY VALUE "${value}" )
|
||||||
|
endmacro()
|
||||||
|
|
||||||
# Set the given property and its config specific brethren to the same value
|
# Set the given property and its config specific brethren to the same value
|
||||||
function( set_target_property_all target property value )
|
function( set_target_property_all target property value )
|
||||||
set_target_properties( "${target}" PROPERTIES "${property}" "${value}" )
|
set_target_properties( "${target}" PROPERTIES "${property}" "${value}" )
|
||||||
@ -393,6 +399,51 @@ function( set_target_property_all target property value )
|
|||||||
endforeach()
|
endforeach()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
# Taken from wxWidgets and modified for Audcaity
|
||||||
|
#
|
||||||
|
# cmd_option(<name> <desc> [default] [STRINGS strings])
|
||||||
|
# The default is ON if third parameter isn't specified
|
||||||
|
function( cmd_option name desc )
|
||||||
|
cmake_parse_arguments( OPTION "" "" "STRINGS" ${ARGN} )
|
||||||
|
|
||||||
|
if( ARGC EQUAL 2 )
|
||||||
|
if( OPTION_STRINGS )
|
||||||
|
list( GET OPTION_STRINGS 1 default )
|
||||||
|
else()
|
||||||
|
set( default ON )
|
||||||
|
endif()
|
||||||
|
else()
|
||||||
|
set( default ${OPTION_UNPARSED_ARGUMENTS} )
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if( OPTION_STRINGS )
|
||||||
|
set( cache_type STRING )
|
||||||
|
else()
|
||||||
|
set( cache_type BOOL )
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set( ${name} "${default}" CACHE ${cache_type} "${desc}" )
|
||||||
|
if( OPTION_STRINGS )
|
||||||
|
set_property( CACHE ${name} PROPERTY STRINGS ${OPTION_STRINGS} )
|
||||||
|
|
||||||
|
# Check valid value
|
||||||
|
set( value_is_valid FALSE )
|
||||||
|
set( avail_values )
|
||||||
|
foreach( opt ${OPTION_STRINGS} )
|
||||||
|
if( ${name} STREQUAL opt )
|
||||||
|
set( value_is_valid TRUE )
|
||||||
|
break()
|
||||||
|
endif()
|
||||||
|
string( APPEND avail_values " ${opt}" )
|
||||||
|
endforeach()
|
||||||
|
if( NOT value_is_valid )
|
||||||
|
message( FATAL_ERROR "Invalid value \"${${name}}\" for option ${name}. Valid values are: ${avail_values}" )
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set( ${name} "${${name}}" PARENT_SCOPE )
|
||||||
|
endfunction()
|
||||||
|
|
||||||
# Add our children
|
# Add our children
|
||||||
add_subdirectory( "cmake-proxies" )
|
add_subdirectory( "cmake-proxies" )
|
||||||
add_subdirectory( "help" )
|
add_subdirectory( "help" )
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
|
# Allow user to globally set the library preference
|
||||||
# Allow user to globally set the system library preference
|
cmd_option( ${_OPT}lib_preference
|
||||||
option( ${_OPT}prefer_system_libs "Use system libraries if available" YES )
|
"Library preference [system (if available), local]"
|
||||||
|
"system"
|
||||||
|
STRINGS "system" "local"
|
||||||
|
)
|
||||||
|
|
||||||
#
|
#
|
||||||
# Add individual library targets
|
# Add individual library targets
|
||||||
@ -31,23 +34,8 @@ function( addlib dir name symbol required check )
|
|||||||
set( TARGET ${dir} )
|
set( TARGET ${dir} )
|
||||||
set( TARGET_ROOT ${libsrc}/${dir} )
|
set( TARGET_ROOT ${libsrc}/${dir} )
|
||||||
|
|
||||||
# If the target is required, then it's always enabled. Otherwise,
|
# Define the option name
|
||||||
# give the user the option to enable/disable it.
|
set( use ${_OPT}use_${name} )
|
||||||
set( enable ${_OPT}enable_${name} )
|
|
||||||
if( required )
|
|
||||||
set( ${enable} YES )
|
|
||||||
else()
|
|
||||||
option( ${enable} "Enable ${name} library" ON )
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# Let the Audacity target know that this library will be used.
|
|
||||||
set( USE_${symbol} ${${enable}} CACHE INTERNAL USE_${symbol} )
|
|
||||||
|
|
||||||
# Bail if the target isn't enabled.
|
|
||||||
if( NOT ${enable} )
|
|
||||||
message( STATUS "========== ${name} disabled ==========" )
|
|
||||||
return()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# If we're not checking for system or local here, then let the
|
# If we're not checking for system or local here, then let the
|
||||||
# target config handle the rest.
|
# target config handle the rest.
|
||||||
@ -56,30 +44,54 @@ function( addlib dir name symbol required check )
|
|||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Only present the system library option if pkg-config was found and
|
# If the target isn't required, allow the user to select which one
|
||||||
# a package has been specified. Otherwise, the local library will
|
# to use or disable it entirely
|
||||||
# be used unconditionally.
|
set( desc "local" )
|
||||||
set( system ${_OPT}use_system_${name} )
|
if( packages )
|
||||||
if( PkgConfig_FOUND AND packages )
|
set( sysopt "system" )
|
||||||
option( ${system} "Use ${name} system library if available" ${${_OPT}prefer_system_libs} )
|
string( PREPEND desc "system (if available), " )
|
||||||
|
set( default "${${_OPT}lib_preference}" )
|
||||||
else()
|
else()
|
||||||
set( ${system} NO )
|
set( default "local" )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if( NOT required )
|
||||||
|
set( reqopt "off" )
|
||||||
|
string( APPEND desc ", off" )
|
||||||
|
endif()
|
||||||
|
|
||||||
|
cmd_option( ${use}
|
||||||
|
"Use ${name} library [${desc}]"
|
||||||
|
"${default}"
|
||||||
|
STRINGS ${sysopt} "local" ${reqopt}
|
||||||
|
)
|
||||||
|
|
||||||
|
# Bail if the target will not be used
|
||||||
|
if( ${use} STREQUAL "off" )
|
||||||
|
message( STATUS "========== ${name} disabled ==========" )
|
||||||
|
|
||||||
|
set( USE_${symbol} OFF CACHE INTERNAL "" FORCE )
|
||||||
|
|
||||||
|
return()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Let the Audacity target know that this library will be used
|
||||||
|
set( USE_${symbol} ON CACHE INTERNAL "" FORCE )
|
||||||
|
|
||||||
message( STATUS "========== Configuring ${name} ==========" )
|
message( STATUS "========== Configuring ${name} ==========" )
|
||||||
|
|
||||||
# Check for the system package if the user prefers it.
|
# Check for the system package(s) if the user prefers it
|
||||||
if( ${system} )
|
if( ${use} STREQUAL "system" )
|
||||||
# Look them up
|
# Look them up
|
||||||
pkg_check_modules( ${TARGET} ${packages} )
|
pkg_check_modules( PKG_${TARGET} ${packages} )
|
||||||
if( ${TARGET}_FOUND )
|
if( PKG_${TARGET}_FOUND )
|
||||||
message( STATUS "Using '${name}' system library" )
|
message( STATUS "Using '${name}' system library" )
|
||||||
|
|
||||||
# Create the target interface library
|
# Create the target interface library
|
||||||
add_library( ${TARGET} INTERFACE IMPORTED GLOBAL )
|
add_library( ${TARGET} INTERFACE IMPORTED GLOBAL )
|
||||||
|
|
||||||
# Retrieve the package information
|
# Retrieve the package information
|
||||||
get_package_interface( ${TARGET} )
|
get_package_interface( PKG_${TARGET} )
|
||||||
|
|
||||||
# And add it to our target
|
# And add it to our target
|
||||||
target_include_directories( ${TARGET} INTERFACE ${INCLUDES} )
|
target_include_directories( ${TARGET} INTERFACE ${INCLUDES} )
|
||||||
@ -87,11 +99,14 @@ function( addlib dir name symbol required check )
|
|||||||
target_link_directories( ${TARGET} INTERFACE ${LINKDIRS} )
|
target_link_directories( ${TARGET} INTERFACE ${LINKDIRS} )
|
||||||
target_link_options( ${TARGET} INTERFACE ${LOPTS} )
|
target_link_options( ${TARGET} INTERFACE ${LOPTS} )
|
||||||
target_link_libraries( ${TARGET} INTERFACE ${LIBRARIES} )
|
target_link_libraries( ${TARGET} INTERFACE ${LIBRARIES} )
|
||||||
|
else()
|
||||||
|
set( ${use} "local" )
|
||||||
|
set_property( CACHE ${use} PROPERTY VALUE "local" )
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# User want the local package or the system one wasn't found
|
# User wants the local package or the system one wasn't found
|
||||||
if( NOT ${TARGET}_FOUND )
|
if( ${use} STREQUAL "local" )
|
||||||
message( STATUS "Using '${name}' local library" )
|
message( STATUS "Using '${name}' local library" )
|
||||||
|
|
||||||
# Pull in the target config
|
# Pull in the target config
|
||||||
|
@ -11,39 +11,52 @@ def_vars()
|
|||||||
|
|
||||||
message( STATUS "========== Configuring ${name} ==========" )
|
message( STATUS "========== Configuring ${name} ==========" )
|
||||||
|
|
||||||
# Let the Audacity target know we're using ffmpeg
|
# We can only (possibly) link to it if we have pkg-config
|
||||||
set( USE_${symbol} ON CACHE INTERNAL USE_${symbol} )
|
if( PkgConfig_FOUND )
|
||||||
|
set( opt "linked" )
|
||||||
# Add the system/local option
|
set( desc "linked, " )
|
||||||
option( ${_OPT}use_system_${name} "Use ${name} system library if available" ${${_OPT}prefer_system_libs} )
|
|
||||||
|
|
||||||
# Look up the system packages if the user wants them
|
|
||||||
if( ${_OPT}use_system_${name} )
|
|
||||||
# Provide an option that determines if the libraries are loaded
|
|
||||||
# dynamically at run time or statically linked at build time
|
|
||||||
option( ${_OPT}disable_dynamic_${name} "Disable dynamic loading of ${name} libraries" NO)
|
|
||||||
|
|
||||||
# Look them up
|
|
||||||
pkg_check_modules( ${TARGET} ${packages} )
|
|
||||||
else()
|
|
||||||
# Make sure to reset in case user reconfigures between local/system
|
|
||||||
set( ${_OPT}disable_dynamic_${name} NO CACHE INTERNAL "" )
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# If the system packages were found
|
# FFmpeg is either dynamically loaded, linked to, or off
|
||||||
if( ${TARGET}_FOUND )
|
cmd_option( ${_OPT}use_ffmpeg
|
||||||
message( STATUS "Using '${name}' system library" )
|
"Use ffmpeg library [loaded, ${desc}off]"
|
||||||
|
"loaded"
|
||||||
|
STRINGS "loaded" ${opt} "off"
|
||||||
|
)
|
||||||
|
|
||||||
# Pull in the package settings
|
# Deteremine if it will be turned off, linked to, or loaded
|
||||||
get_package_interface( ${TARGET} )
|
if( ${_OPT}use_ffmpeg STREQUAL "off" )
|
||||||
|
message( STATUS "Disabling '${name}' library" )
|
||||||
else()
|
else()
|
||||||
message( STATUS "Using '${name}' local library" )
|
# Let the Audacity target know that this library will be used.
|
||||||
|
set( USE_${symbol} ON CACHE INTERNAL USE_${symbol} )
|
||||||
|
|
||||||
# Otherwise define the local settings
|
# Only need to look up the package if we're linking to it
|
||||||
list( APPEND INCLUDES
|
set( isdyn YES )
|
||||||
INTERFACE
|
if( ${_OPT}use_ffmpeg STREQUAL "linked" )
|
||||||
${TARGET_ROOT}
|
pkg_check_modules( ${TARGET} ${packages} )
|
||||||
)
|
|
||||||
|
# Set up for link if it was found
|
||||||
|
if( ${TARGET}_FOUND )
|
||||||
|
message( STATUS "Linking '${name}' library during build" )
|
||||||
|
|
||||||
|
# Pull in the package settings
|
||||||
|
get_package_interface( ${TARGET} )
|
||||||
|
|
||||||
|
# Not dynamic
|
||||||
|
set( isdyn NO )
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# Pull in the local includes if we're dynamically loading
|
||||||
|
if( isdyn )
|
||||||
|
message( STATUS "Will dynamically load '${name}' library at runtime" )
|
||||||
|
|
||||||
|
list( APPEND INCLUDES
|
||||||
|
INTERFACE
|
||||||
|
${TARGET_ROOT}
|
||||||
|
)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# And add the settings to the target
|
# And add the settings to the target
|
||||||
|
@ -29,6 +29,7 @@
|
|||||||
/* This is the version 1.0.X header file. */
|
/* This is the version 1.0.X header file. */
|
||||||
#define SNDFILE_1
|
#define SNDFILE_1
|
||||||
|
|
||||||
|
#include <stdint.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
|
@ -7,23 +7,48 @@ set( CMAKE_MODULE_PATH ${TARGET_ROOT}/cmake_support )
|
|||||||
|
|
||||||
# Define the platform specific interface options
|
# Define the platform specific interface options
|
||||||
if( CMAKE_SYSTEM_NAME MATCHES "Windows" )
|
if( CMAKE_SYSTEM_NAME MATCHES "Windows" )
|
||||||
option( ${_OPT}use_pa_ds "Enable the portaudio DirectSound interface if available" YES )
|
cmd_option(
|
||||||
option( ${_OPT}use_pa_wasapi "Enable the portaudio WASAPI interface if available" YES )
|
${_OPT}use_pa_ds
|
||||||
option( ${_OPT}use_pa_wmme "Enable the portaudio WMME interface if available" YES )
|
"Use the portaudio DirectSound interface if available"
|
||||||
|
YES
|
||||||
|
)
|
||||||
|
cmd_option(
|
||||||
|
${_OPT}use_pa_wasapi
|
||||||
|
"Use the portaudio WASAPI interface if available"
|
||||||
|
YES
|
||||||
|
)
|
||||||
|
cmd_option(
|
||||||
|
${_OPT}use_pa_wmme
|
||||||
|
"Use the portaudio WMME interface if available"
|
||||||
|
YES
|
||||||
|
)
|
||||||
elseif( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
|
elseif( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
|
||||||
option( ${_OPT}use_pa_coreaudio "Enable the portaudio CoreAudio interface if available" YES )
|
cmd_option(
|
||||||
|
${_OPT}use_pa_coreaudio
|
||||||
|
"Use the portaudio CoreAudio interface if available"
|
||||||
|
YES
|
||||||
|
)
|
||||||
elseif( CMAKE_SYSTEM_NAME MATCHES "Linux|FreeBSD" )
|
elseif( CMAKE_SYSTEM_NAME MATCHES "Linux|FreeBSD" )
|
||||||
option( ${_OPT}use_pa_alsa "Enable the portaudio ALSA interface if available" YES )
|
cmd_option(
|
||||||
|
${_OPT}use_pa_alsa
|
||||||
|
"Use the portaudio ALSA interface if available"
|
||||||
|
YES
|
||||||
|
)
|
||||||
|
|
||||||
if( ${_OPT}use_pa_alsa )
|
if( ${_OPT}use_pa_alsa )
|
||||||
find_package( ALSA )
|
find_package( ALSA )
|
||||||
if( NOT ALSA_FOUND )
|
if( NOT ALSA_FOUND )
|
||||||
set( ${_OPT}use_pa_alsa NO CACHE INTERNAL "" )
|
set_cache_value( ${_OPT}use_pa_alsa NO )
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Look for OSS if the user wants it
|
# Look for OSS if the user wants it
|
||||||
option( ${_OPT}use_pa_oss "Use the OSS audio interface if available" YES )
|
cmd_option(
|
||||||
|
${_OPT}use_pa_oss
|
||||||
|
"Use the OSS audio interface if available"
|
||||||
|
YES
|
||||||
|
)
|
||||||
if( ${_OPT}use_pa_oss )
|
if( ${_OPT}use_pa_oss )
|
||||||
find_path( OSS_INCLUDE NAMES sys/soundcard.h )
|
find_path( OSS_INCLUDE NAMES sys/soundcard.h )
|
||||||
mark_as_advanced( FORCE OSS_INCLUDE )
|
mark_as_advanced( FORCE OSS_INCLUDE )
|
||||||
@ -40,25 +65,23 @@ if( ${_OPT}use_pa_oss )
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if( NOT OSS_INCLUDE_DIRS )
|
if( NOT OSS_INCLUDE_DIRS )
|
||||||
set( ${_OPT}use_pa_oss NO CACHE INTERNAL "" )
|
set_cache_value( ${_OPT}use_pa_oss NO )
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Look for JACK if the user wants it
|
# JACK can be dynamically loaded, linked to, or off
|
||||||
option( ${_OPT}use_pa_jack "Use the JACK audio interface if available" YES )
|
cmd_option( ${_OPT}use_pa_jack
|
||||||
if( ${_OPT}use_pa_jack )
|
"Use the JACK audio interface if available [loaded, linked, off]"
|
||||||
# Provide an option that determines if the libraries are loaded
|
"linked"
|
||||||
# dynamically at run time or statically linked at build time
|
STRINGS "loaded" "linked" "off"
|
||||||
option( ${_OPT}disable_dynamic_jack "Disable dynamic loading of JACK libraries" YES )
|
)
|
||||||
|
|
||||||
|
if( NOT ${_OPT}use_pa_jack STREQUAL "off" )
|
||||||
# Find it
|
# Find it
|
||||||
find_package( Jack )
|
find_package( Jack )
|
||||||
if( NOT JACK_FOUND)
|
if( NOT JACK_FOUND)
|
||||||
set( ${_OPT}use_pa_jack NO CACHE INTERNAL "" )
|
set_cache_value( ${_OPT}use_pa_jack "off" )
|
||||||
endif()
|
endif()
|
||||||
else()
|
|
||||||
# Make sure to reset in case user reconfigures later
|
|
||||||
set( ${_OPT}disable_dynamic_jack NO CACHE INTERNAL "" )
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
list( APPEND SOURCES
|
list( APPEND SOURCES
|
||||||
@ -116,7 +139,7 @@ list( APPEND SOURCES
|
|||||||
${TARGET_ROOT}/src/hostapi/oss/pa_unix_oss.c
|
${TARGET_ROOT}/src/hostapi/oss/pa_unix_oss.c
|
||||||
>
|
>
|
||||||
|
|
||||||
$<$<BOOL:${${_OPT}use_pa_jack}>:
|
$<$<NOT:$<STREQUAL:${${_OPT}use_pa_jack},off>>:
|
||||||
${TARGET_ROOT}/src/hostapi/jack/pa_jack.c
|
${TARGET_ROOT}/src/hostapi/jack/pa_jack.c
|
||||||
${TARGET_ROOT}/src/hostapi/jack/pa_jack_dynload.c
|
${TARGET_ROOT}/src/hostapi/jack/pa_jack_dynload.c
|
||||||
>
|
>
|
||||||
@ -150,7 +173,7 @@ list( APPEND INCLUDES
|
|||||||
${OSS_INCLUDE_DIRS}
|
${OSS_INCLUDE_DIRS}
|
||||||
>
|
>
|
||||||
|
|
||||||
$<$<BOOL:${${_OPT}use_pa_jack}>:
|
$<$<NOT:$<STREQUAL:${${_OPT}use_pa_jack},off>>:
|
||||||
${TARGET_ROOT}/src/hostapi/jack
|
${TARGET_ROOT}/src/hostapi/jack
|
||||||
${JACK_INCLUDE_DIRS}
|
${JACK_INCLUDE_DIRS}
|
||||||
>
|
>
|
||||||
@ -186,11 +209,11 @@ list( APPEND DEFINES
|
|||||||
HAVE_SYS_SOUNDCARD_H=1
|
HAVE_SYS_SOUNDCARD_H=1
|
||||||
>
|
>
|
||||||
|
|
||||||
$<$<BOOL:${${_OPT}use_pa_jack}>:
|
$<$<NOT:$<STREQUAL:${${_OPT}use_pa_jack},off>>:
|
||||||
PA_USE_JACK=1
|
PA_USE_JACK=1
|
||||||
>
|
>
|
||||||
|
|
||||||
$<$<NOT:$<BOOL:${${_OPT}disable_dynamic_jack}>>:
|
$<$<STREQUAL:${${_OPT}use_pa_jack},dynamic>:
|
||||||
PA_DYNAMIC_JACK=1
|
PA_DYNAMIC_JACK=1
|
||||||
>
|
>
|
||||||
)
|
)
|
||||||
@ -205,7 +228,7 @@ list( APPEND LIBRARIES
|
|||||||
${OSS_LIBRARIES}
|
${OSS_LIBRARIES}
|
||||||
>
|
>
|
||||||
|
|
||||||
$<$<BOOL:${${_OPT}use_pa_jack}>:
|
$<$<NOT:$<STREQUAL:${${_OPT}use_pa_jack},off>>:
|
||||||
${JACK_LIBRARIES}
|
${JACK_LIBRARIES}
|
||||||
>
|
>
|
||||||
)
|
)
|
||||||
|
@ -6,8 +6,13 @@ def_vars()
|
|||||||
|
|
||||||
message( STATUS "========== Configuring ${name} ==========" )
|
message( STATUS "========== Configuring ${name} ==========" )
|
||||||
|
|
||||||
option( ${_OPT}use_system_${name} "Use ${name} system library if available" ${${_OPT}prefer_system_libs} )
|
cmd_option( ${_OPT}use_wxwidgets
|
||||||
if( ${_OPT}use_system_${name} )
|
"Use ${name} library [system (if available), local]"
|
||||||
|
"${audacity_lib_preference}"
|
||||||
|
STRINGS "system" "local"
|
||||||
|
)
|
||||||
|
|
||||||
|
if( ${_OPT}use_wxwidgets STREQUAL "system" )
|
||||||
find_package(wxWidgets)
|
find_package(wxWidgets)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -53,8 +58,6 @@ if( wxWidgets_FOUND )
|
|||||||
else()
|
else()
|
||||||
message( STATUS "Using local '${name}' library" )
|
message( STATUS "Using local '${name}' library" )
|
||||||
|
|
||||||
set( ${_OPT}use_system_${name} OFF CACHE BOOL "Prefer ${name} system library if available" FORCE )
|
|
||||||
|
|
||||||
set( WXWIN $ENV{WXWIN} )
|
set( WXWIN $ENV{WXWIN} )
|
||||||
if( "${WXWIN}" STREQUAL "" )
|
if( "${WXWIN}" STREQUAL "" )
|
||||||
# XXX: Look into importing instead of adding to this project
|
# XXX: Look into importing instead of adding to this project
|
||||||
@ -118,7 +121,7 @@ else()
|
|||||||
)
|
)
|
||||||
|
|
||||||
# Do NOT split the generator expressions across multiple lines here.
|
# Do NOT split the generator expressions across multiple lines here.
|
||||||
# CMake appears to have a bug and doesn't see to handle it correctly
|
# CMake appears to have a bug and doesn't seem to handle it correctly
|
||||||
# for target link libraries.
|
# for target link libraries.
|
||||||
set( LIBRARIES
|
set( LIBRARIES
|
||||||
adv
|
adv
|
||||||
|
@ -1072,11 +1072,19 @@ if( CMAKE_VERSION VERSION_GREATER_EQUAL "3.16" AND NOT CCACHE_PROGRAM )
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Handle Ladspa option
|
# Handle Ladspa option
|
||||||
option( ${_OPT}enable_ladspa "Enable LADSPA plug-in support" ON )
|
cmd_option(
|
||||||
set( USE_LADSPA ${${_OPT}enable_ladspa} )
|
${_OPT}use_ladspa
|
||||||
|
"Use LADSPA plug-in support [on, off]"
|
||||||
|
ON
|
||||||
|
)
|
||||||
|
set( USE_LADSPA ${${_OPT}use_ladspa} )
|
||||||
|
|
||||||
# Handle VST option
|
# 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( USE_VST ${${_OPT}enable_vst} )
|
||||||
|
|
||||||
set( AUDACITY_NAME "Audacity" )
|
set( AUDACITY_NAME "Audacity" )
|
||||||
@ -1119,7 +1127,7 @@ if( CMAKE_SYSTEM_NAME MATCHES "Windows" )
|
|||||||
configure_file( audacity_config.h.in private/configwin.h )
|
configure_file( audacity_config.h.in private/configwin.h )
|
||||||
|
|
||||||
# Copy over the wxWidgets DLLs
|
# Copy over the wxWidgets DLLs
|
||||||
if( use_system_wxwidgets )
|
if( ${_OPT}use_wxwidgets STREQUAL "system" )
|
||||||
set( wxlibs "$ENV{WXWIN}" )
|
set( wxlibs "$ENV{WXWIN}" )
|
||||||
else()
|
else()
|
||||||
set( wxlibs "${CMAKE_BINARY_DIR}" )
|
set( wxlibs "${CMAKE_BINARY_DIR}" )
|
||||||
@ -1144,7 +1152,7 @@ if( CMAKE_SYSTEM_NAME MATCHES "Windows" )
|
|||||||
DEL ${dlls}
|
DEL ${dlls}
|
||||||
)
|
)
|
||||||
IF %1 EQU xyzzy (
|
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}\"
|
ECHO %%i >>\"${dlls}\"
|
||||||
CALL %0 xyzzy \"${libdir}\" %%i
|
CALL %0 xyzzy \"${libdir}\" %%i
|
||||||
)
|
)
|
||||||
@ -1172,7 +1180,11 @@ elseif( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
|
|||||||
set( _EXE "Audacity" )
|
set( _EXE "Audacity" )
|
||||||
|
|
||||||
# Handle Audio Units option
|
# 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( USE_AUDIO_UNITS ${${_OPT}enable_audiounits} )
|
||||||
|
|
||||||
set_target_properties(
|
set_target_properties(
|
||||||
@ -1296,7 +1308,7 @@ elseif( CMAKE_SYSTEM_NAME MATCHES "Linux|FreeBSD" )
|
|||||||
configure_file( audacity.desktop.in ${_INTDIR}/audacity.desktop )
|
configure_file( audacity.desktop.in ${_INTDIR}/audacity.desktop )
|
||||||
|
|
||||||
# Create the script to copy required wxWidgets libraries
|
# 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"
|
file( WRITE "${_INTDIR}/copy_libs.sh"
|
||||||
"for lib in \$(ldd ${_EXEDIR}/${_EXE} | awk '/libwx/{print \$1}')
|
"for lib in \$(ldd ${_EXEDIR}/${_EXE} | awk '/libwx/{print \$1}')
|
||||||
do
|
do
|
||||||
|
Loading…
x
Reference in New Issue
Block a user