Browse Source

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
au-ny-api
Leland Lucius 2 years ago
parent
commit
70bbfb69d5
  1. 92
      CMakeLists.txt
  2. 86
      cmake-proxies/CMakeLists.txt
  3. 17
      cmake-proxies/FileDialog/CMakeLists.txt
  4. 8
      cmake-proxies/expat/CMakeLists.txt
  5. 23
      cmake-proxies/ffmpeg/CMakeLists.txt
  6. 6
      cmake-proxies/lame/CMakeLists.txt
  7. 4
      cmake-proxies/lib-widget-extra/CMakeLists.txt
  8. 15
      cmake-proxies/libflac/CMakeLists.txt
  9. 10
      cmake-proxies/libid3tag/CMakeLists.txt
  10. 11
      cmake-proxies/libmad/CMakeLists.txt
  11. 11
      cmake-proxies/libnyquist/CMakeLists.txt
  12. 4
      cmake-proxies/libogg/CMakeLists.txt
  13. 2
      cmake-proxies/libscorealign/CMakeLists.txt
  14. 16
      cmake-proxies/libsndfile/CMakeLists.txt
  15. 50
      cmake-proxies/libsoxr/CMakeLists.txt
  16. 2
      cmake-proxies/libvamp/CMakeLists.txt
  17. 5
      cmake-proxies/libvorbis/CMakeLists.txt
  18. 20
      cmake-proxies/lv2/CMakeLists.txt
  19. 2
      cmake-proxies/mod-nyq-bench/CMakeLists.txt
  20. 2
      cmake-proxies/mod-script-pipe/CMakeLists.txt
  21. 265
      cmake-proxies/portaudio-v19/CMakeLists.txt
  22. 70
      cmake-proxies/portmidi/CMakeLists.txt
  23. 67
      cmake-proxies/portmixer/CMakeLists.txt
  24. 2
      cmake-proxies/portsmf/CMakeLists.txt
  25. 16
      cmake-proxies/sbsms/CMakeLists.txt
  26. 27
      cmake-proxies/soundtouch/CMakeLists.txt
  27. 6
      cmake-proxies/twolame/CMakeLists.txt
  28. 78
      cmake-proxies/wxWidgets/CMakeLists.txt
  29. 4
      locale/CMakeLists.txt
  30. 315
      src/CMakeLists.txt
  31. 3
      src/audacity_config.h.in

92
CMakeLists.txt

@ -63,6 +63,12 @@ set( CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake-proxies/cmake-modules)
set( CMAKE_CXX_STANDARD 14 )
set( CMAKE_CXX_STANDARD_REQUIRED ON )
# Use ccache if available
find_program( CCACHE_PROGRAM ccache )
if( CCACHE_PROGRAM )
set_property( GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}" )
endif()
# Our very own project
project( Audacity )
@ -118,10 +124,15 @@ if( HAVE_LIBM )
list( APPEND CMAKE_REQUIRED_LIBRARIES -lm )
endif()
# Add the dynamic linker library (if found) to the list of required libraries
check_library_exists( dl dlopen "" HAVE_LIBDL )
if( HAVE_LIBDL )
list( APPEND CMAKE_REQUIRED_LIBRARIES -ldl )
# Add the dynamic linker library (if needed) to the list of required libraries
list( APPEND CMAKE_REQUIRED_LIBRARIES ${CMAKE_DL_LIBS} )
# May be a misconfiguration in my system, but CMake doesn't want to look
# in /usr/local/lib by default...so force the issue
if( CMAKE_SYSTEM_NAME MATCHES "FreeBSD" )
list( APPEND CMAKE_EXE_LINKER_FLAGS -L/usr/local/lib )
list( APPEND CMAKE_MODULE_LINKER_FLAGS -L/usr/local/lib )
list( APPEND CMAKE_SHARED_LINKER_FLAGS -L/usr/local/lib )
endif()
# Make sure they're used during the link steps
@ -130,10 +141,35 @@ set( CMAKE_LINK_INTERFACE_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} )
# Various common checks whose results are used by the various targets
test_big_endian( WORDS_BIGENDIAN )
# Check for various compiler flags
if( CMAKE_CXX_COMPILER_ID MATCHES "AppleClang|Clang|GNU" )
check_cxx_compiler_flag( "-mmmx" HAVE_MMX )
if( HAVE_MMX )
set( MMX_FLAG "-mmmx" CACHE INTERNAL "" )
endif()
check_cxx_compiler_flag( "-msse" HAVE_SSE )
if( HAVE_SSE )
set( SSE_FLAG "-msse" CACHE INTERNAL "" )
endif()
check_cxx_compiler_flag( "-msse2" HAVE_SSE2 )
if( HAVE_SSE2 )
set( SSE_FLAG "-msse2" CACHE INTERNAL "" )
endif()
elseif( CMAKE_CXX_COMPILER_ID MATCHES "MSVC" )
set( HAVE_MMX ON )
set( MMX_FLAG "" )
set( HAVE_SSE ON )
set( SSE_FLAG "/arch:SSE" )
set( HAVE_SSE2 ON )
set( SSE2_FLAG "/arch:SSE2" )
endif()
check_include_files( "float.h;stdarg.h;stdlib.h;string.h" STDC_HEADERS )
check_include_file( "byteswap.h" HAVE_BYTESWAP_H )
check_include_file( "assert.h" HAVE_ASSERT_H )
check_include_file( "byteswap.h" HAVE_BYTESWAP_H )
check_include_file( "errno.h" HAVE_ERRNO_H )
check_include_file( "fcntl.h" HAVE_FCNTL_H )
check_include_file( "fenv.h" HAVE_FENV_H )
@ -151,12 +187,15 @@ check_include_file( "xmmintrin.h" HAVE_XMMINTRIN_H )
check_include_file( "sys/param.h" HAVE_SYS_PARAM_H )
check_include_file( "sys/stat.h" HAVE_SYS_STAT_H )
check_include_file( "sys/types.h" HAVE_SYS_TYPES_H )
check_include_file( "sys/wait.h" HAVE_SYS_WAIT_H )
check_symbol_exists( bcopy "strings.h" HAVE_BCOPY )
check_symbol_exists( fileno "stdio.h" HAVE_FILENO )
check_symbol_exists( flock "sys/file.h" HAVE_FLOCK )
check_symbol_exists( fork "unistd.h" HAVE_FORK )
check_symbol_exists( fsync "unistd.h" HAVE_FSYNC )
check_symbol_exists( ftruncate "unistd.h" HAVE_FTRUNCATE )
check_symbol_exists( getpagesize "unistd.h" HAVE_GETPAGESIZE )
check_symbol_exists( gettimeofday "sys/time.h" HAVE_GETTIMEOFDAY )
check_symbol_exists( gmtime "time.h" HAVE_GMTIME )
check_symbol_exists( gmtime_r "time.h" HAVE_GMTIME_R )
@ -165,6 +204,7 @@ check_symbol_exists( lrintf "math.h" HAVE_LRINTF )
check_symbol_exists( lround "math.h" HAVE_LROUND )
check_symbol_exists( lstat "sys/stat.h" HAVE_LSTAT )
check_symbol_exists( memcpy "string.h" HAVE_MEMCPY )
check_symbol_exists( memmove "string.h" HAVE_MEMMOVE )
check_symbol_exists( mlock "sys/mman.h" HAVE_MLOCK )
check_symbol_exists( pipe "unistd.h" HAVE_PIPE )
check_symbol_exists( posix_fadvise "fcntl.h" HAVE_POSIX_FADVISE )
@ -239,14 +279,24 @@ set( _PREFIX "${CMAKE_INSTALL_PREFIX}" )
set( _LIBDIR "${CMAKE_INSTALL_LIBDIR}/audacity" )
set( _RPATH "\$ORIGIN/../${_LIBDIR}" )
set( _DATADIR "${CMAKE_INSTALL_DATADIR}" )
set( _PKGDATA "${_DATADIR}/audacity" )
set( _PKGDATA "${_DATADIR}/audacity/" )
# Precreate the lib and lib64 directories so we can make then the same
if( NOT EXISTS "${CMAKE_BINARY_DIR}/lib" )
file( MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/lib" )
endif()
if( NOT EXISTS "${CMAKE_BINARY_DIR}/lib64" )
file( CREATE_LINK "${CMAKE_BINARY_DIR}/lib" "${CMAKE_BINARY_DIR}/lib64" SYMBOLIC )
endif()
# Helper to organize sources into folders for the IDEs
macro( organize_source root prefix sources )
set( cleaned )
foreach(source ${sources})
foreach( source ${sources} )
# Remove generator expressions
string( REGEX REPLACE ".*>:(.*)>" "\\1" source "${source}" )
string( REGEX REPLACE ".*>:(.*)>*" "\\1" source "${source}" )
string( REPLACE ">" "" source "${source}" )
# Remove keywords
string( REGEX REPLACE "^[A-Z]+$" "" source "${source}" )
@ -254,7 +304,7 @@ macro( organize_source root prefix sources )
# Add to cleaned
list( APPEND cleaned "${source}" )
endforeach()
# Define the source groups
if( "${prefix}" STREQUAL "" )
source_group( TREE "${root}" FILES ${cleaned} )
@ -283,30 +333,25 @@ endfunction()
# Helper to retrieve the settings returned from pkg_check_modules()
macro( get_package_interface package )
set( INCLUDES
INTERFACE
${${package}_INCLUDE_DIRS}
${${package}_INCLUDE_DIRS}
)
set( CLFAGS
INTERFACE
${${package}_CFLAGS}
${${package}_CFLAGS_OTHER}
set( COPTS
${${package}_CFLAGS}
${${package}_CFLAGS_OTHER}
)
set( LDFLAGS
INTERFACE
${${package}_LDFLAGS}
${${package}_LDFLAGS_OTHER}
set( LOPTS
${${package}_LDFLAGS}
${${package}_LDFLAGS_OTHER}
)
set( LINKDIRS
INTERFACE
${${package}_LIBRARY_DIRS}
${${package}_LIBRARY_DIRS}
)
set( LIBRARIES
INTERFACE
${${package}_LIBRARIES}
${${package}_LIBRARIES}
)
endmacro()
@ -342,4 +387,3 @@ add_subdirectory( "cmake-proxies/mod-script-pipe" )
print_properties(TARGET "Audacity")
#]]

86
cmake-proxies/CMakeLists.txt

@ -23,7 +23,7 @@ option( prefer_system_libs "Use system libraries if available" YES )
#
# packages A list of packages required for this target in pkg-config
# format.
function( addlib dir name symbol required check ) #packages )
function( addlib dir name symbol required check )
# Extract the list of packages from the function args
list( SUBLIST ARGV 5 -1 packages )
@ -40,6 +40,9 @@ function( addlib dir name symbol required check ) #packages )
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 ==========" )
@ -65,65 +68,62 @@ function( addlib dir name symbol required check ) #packages )
message( STATUS "========== Configuring ${name} ==========" )
# Let the Audacity target know that this library will be used.
set( USE_${symbol} ON CACHE INTERNAL USE_${symbol} )
# Check for the system package if the user prefers it.
if( ${system} )
# Look them up
pkg_check_modules( ${symbol} ${packages} )
if( ${symbol}_FOUND )
pkg_check_modules( ${TARGET} ${packages} )
if( ${TARGET}_FOUND )
message( STATUS "Using '${name}' system library" )
# Use the symbol name for the target to prevent a collision when
# the alias libraries are defined for the listed packages.
set( TARGET ${symbol} )
# Create the target interface library
add_library( ${TARGET} INTERFACE IMPORTED GLOBAL )
# Retrieve the package information
get_package_interface( ${symbol} )
get_package_interface( ${TARGET} )
# And add it to our target
target_include_directories( ${TARGET} INTERFACE ${INCLUDES} )
target_compile_options( ${TARGET} INTERFACE ${CFLAGS} )
target_compile_options( ${TARGET} INTERFACE ${COPTS} )
target_link_directories( ${TARGET} INTERFACE ${LINKDIRS} )
target_link_options( ${TARGET} INTERFACE ${LDFLAGS} )
target_link_options( ${TARGET} INTERFACE ${LOPTS} )
target_link_libraries( ${TARGET} INTERFACE ${LIBRARIES} )
endif()
endif()
# Define a library alias for each of the packages
foreach( package ${packages} )
# Convert the package spec to a list
string( REPLACE " " ";" package "${package}" )
# And extract just the package name
list( GET package 0 package )
# User want the local package or the system one wasn't found
if( NOT ${TARGET}_FOUND )
message( STATUS "Using '${name}' local library" )
# Create the alias
add_library( "lib${package}" ALIAS ${TARGET} )
endforeach()
# Pull in the target config
add_subdirectory( ${dir} EXCLUDE_FROM_ALL )
# We are done...
return()
endif()
# Get the list of targets defined by that config
get_property( targets DIRECTORY "${dir}" PROPERTY BUILDSYSTEM_TARGETS )
# Set the folder (for the IDEs) for each one
foreach( target ${targets} )
# Skip interface libraries since they don't have any source to
# present in the IDEs
get_target_property( type "${target}" TYPE )
if( NOT "${type}" STREQUAL "INTERFACE_LIBRARY" )
set_target_properties( ${target} PROPERTIES FOLDER "lib-src" )
endif()
endforeach()
endif()
message( STATUS "Using '${name}' local library" )
# Pull in the target config
add_subdirectory( ${dir} EXCLUDE_FROM_ALL )
# Define a library alias for each of the packages
foreach( package ${packages} )
# Convert the package spec to a list
string( REPLACE " " ";" package "${package}" )
# Get the list of targets defined by that config
get_property( targets DIRECTORY "${dir}" PROPERTY BUILDSYSTEM_TARGETS )
# And extract just the package name
list( GET package 0 package )
# Set the folder (for the IDEs) for each one
foreach( target ${targets} )
# Skip interface libraries since they don't have any source to
# present in the IDEs
get_target_property( type "${target}" TYPE )
if( NOT "${type}" STREQUAL "INTERFACE_LIBRARY" )
set_target_properties( ${target} PROPERTIES FOLDER "lib-src" )
# But only if the package name doesn't conflict with the
# target name.
if( NOT TARGET ${package} )
# Create the alias
add_library( "${package}" ALIAS ${TARGET} )
endif()
endforeach()
endfunction()
@ -131,11 +131,11 @@ endfunction()
# Required libraries
#
# directory option symbol req chk version
addlib( wxwidgets wxwidgets WXWIDGETS YES NO "" ) # must be first
addlib( wxWidgets wxwidgets WX YES NO "" ) # must be first
addlib( FileDialog FileDialog FILEDIALOG YES YES "" )
addlib( expat expat EXPAT YES YES "" )
addlib( lame lame LAME YES YES "lame >= 3.100" )
addlib( lib-widget-extra libextra WIDGET YES YES "" )
addlib( lib-widget-extra libextra EXTRA YES YES "" )
addlib( libsndfile sndfile SNDFILE YES YES "sndfile >= 1.0.24" )
addlib( libsoxr soxr SOXR YES YES "soxr >= 0.1.1" )
addlib( portaudio-v19 portaudio PORTAUDIO YES YES "" )
@ -148,11 +148,11 @@ addlib( libid3tag id3tag LIBID3TAG NO YES "id3tag >= 0.15.1
addlib( libmad mad LIBMAD NO YES "mad >= 2.3" )
addlib( libnyquist nyquist NYQUIST NO YES "" )
addlib( libvamp vamp VAMP NO YES "vamp >= 2.5" "vamp-hostsdk >= 2.5" )
addlib( libogg ogg LIBOGG NO YES "ogg >= 1.3.1" )
addlib( libogg ogg LIBVORBIS NO YES "ogg >= 1.3.1" )
addlib( libvorbis vorbis LIBVORBIS NO YES "vorbis >= 1.3.3" "vorbisenc >= 1.3.3" "vorbisfile >= 1.3.3" )
addlib( libflac flac LIBFLAC NO YES "flac >= 1.3.1" "flac++ >= 1.3.1" )
addlib( lv2 lv2 LV2 NO YES "lilv-0 >= 0.24.6" "lv2 >= 1.16.0" "serd-0 >= 0.30.2" "sord-0 >= 0.16.4" "sratom-0 >= 0.6.4" )
addlib( portmidi midi PORTMIDI NO YES "portmidi >= 0.1" )
addlib( portmidi midi MIDI NO YES "portmidi >= 0.1" )
addlib( portmixer portmixer PORTMIXER NO YES "" )
addlib( portsmf portsmf PORTSMF NO YES "portsmf >= 0.1" )
addlib( sbsms sbsms SBSMS NO YES "sbsms >= 2.0.2" )

17
cmake-proxies/FileDialog/CMakeLists.txt

@ -1,12 +1,14 @@
add_library( ${TARGET} STATIC )
def_vars()
list( APPEND SOURCES
PRIVATE
${TARGET_ROOT}/FileDialog.cpp
$<$<PLATFORM_ID:Windows>:${TARGET_ROOT}/win/FileDialogPrivate.cpp>
$<$<PLATFORM_ID:Darwin>:${TARGET_ROOT}/mac/FileDialogPrivate.mm>
$<$<PLATFORM_ID:Linux>:${TARGET_ROOT}/gtk/FileDialogPrivate.cpp>
$<$<BOOL:${wxIS_WIN}>:${TARGET_ROOT}/win/FileDialogPrivate.cpp>
$<$<BOOL:${wxIS_MAC}>:${TARGET_ROOT}/mac/FileDialogPrivate.mm>
$<$<BOOL:${wxIS_GTK}>:${TARGET_ROOT}/gtk/FileDialogPrivate.cpp>
)
list( APPEND INCLUDES
@ -21,16 +23,15 @@ list( APPEND DEFINES
list( APPEND OPTIONS
PRIVATE
$<$<PLATFORM_ID:Windows>:/permissive->
$<$<PLATFORM_ID:Darwin>:-Wno-deprecated-declarations>
$<$<PLATFORM_ID:Linux>:-Wno-deprecated-declarations>
$<$<CXX_COMPILER_ID:MSVC>:/permissive->
$<$<CXX_COMPILER_ID:AppleClang,Clang,GNU>:-Wno-deprecated-declarations>
)
list( APPEND LIBRARIES
PRIVATE
wxwidgets
wxWidgets
PUBLIC
$<$<PLATFORM_ID:Linux>:PkgConfig::GTK>
$<$<BOOL:${wxIS_GTK}>:PkgConfig::GTK>
)
organize_source( "${TARGET_ROOT}" "" "${SOURCES}" )

8
cmake-proxies/expat/CMakeLists.txt

@ -1,6 +1,8 @@
add_library( ${TARGET} STATIC )
def_vars()
list( APPEND SOURCES
PRIVATE
${TARGET_ROOT}/lib/xmlparse.c
@ -12,7 +14,7 @@ list( APPEND SOURCES
list( APPEND INCLUDES
PRIVATE
${CMAKE_CURRENT_BINARY_DIR}/private
${_PRVDIR}
PUBLIC
${TARGET_ROOT}/lib
)
@ -22,10 +24,6 @@ list( APPEND DEFINES
HAVE_EXPAT_CONFIG_H
)
check_symbol_exists( "getpagesize" "unistd.h" HAVE_GETPAGESIZE )
check_symbol_exists( "bcopy" "strings.h" HAVE_BCOPY )
check_symbol_exists( "memmove" "string.h" HAVE_MEMMOVE )
if( WORDS_BIGENDIAN )
set( BYTEORDER 4321 )
else( WORDS_BIGENDIAN )

23
cmake-proxies/ffmpeg/CMakeLists.txt

@ -1,6 +1,7 @@
# Add our target and all of it's aliases
add_library( ${TARGET} INTERFACE )
add_library( ${symbol} ALIAS ${TARGET} )
add_library( libavcodec ALIAS ${TARGET} )
add_library( libavformat ALIAS ${TARGET} )
add_library( libavutil ALIAS ${TARGET} )
@ -8,35 +9,35 @@ add_library( libavutil ALIAS ${TARGET} )
# Pull in standard variables
def_vars()
message( STATUS "========== Configuring ${TARGET} ==========" )
message( STATUS "========== Configuring ${name} ==========" )
# Let the Audacity target know we're using ffmpeg
set( USE_FFMPEG ON CACHE INTERNAL USE_FFMPEG )
set( USE_${symbol} ON CACHE INTERNAL USE_${symbol} )
# Add the system/local option
option( use_system_${TARGET} "Use ${TARGET} system library if available" ${prefer_system_libs} )
option( use_system_${name} "Use ${name} system library if available" ${prefer_system_libs} )
# Look up the system packages if the user wants them
if( use_system_${TARGET} )
if( use_system_${name} )
# Provide an option that determines if the libraries are loaded
# dynamically at run time or statically link to at build time
option( disable_dynamic_loading "Disable dynamic loading of ${TARGET} libraries" NO)
# dynamically at run time or statically linked at build time
option( 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( disable_dynamic_loading NO CACHE INTERNAL "" )
set( disable_dynamic_${name} NO CACHE INTERNAL "" )
endif()
# If the system packages were found
if( ${TARGET}_FOUND )
message( STATUS "Using '${TARGET}' system library" )
message( STATUS "Using '${name}' system library" )
# Pull in the package settings
get_package_interface( ${TARGET} )
else()
message( STATUS "Using '${TARGET}' local library" )
message( STATUS "Using '${name}' local library" )
# Otherwise define the local settings
list( APPEND INCLUDES
@ -47,8 +48,8 @@ endif()
# And add the settings to the target
target_include_directories( ${TARGET} INTERFACE ${INCLUDES} )
target_compile_options( ${TARGET} INTERFACE ${CFLAGS} )
target_compile_options( ${TARGET} INTERFACE ${COPTS} )
target_link_directories( ${TARGET} INTERFACE ${LINKDIRS} )
target_link_options( ${TARGET} INTERFACE ${LDFLAGS} )
target_link_options( ${TARGET} INTERFACE ${LOPTS} )
target_link_libraries( ${TARGET} INTERFACE ${LIBRARIES} )

6
cmake-proxies/lame/CMakeLists.txt

@ -1,6 +1,8 @@
add_library( ${TARGET} STATIC )
def_vars()
list( APPEND SOURCES
PRIVATE
# libmp3lame
@ -39,11 +41,11 @@ list( APPEND SOURCES
list( APPEND INCLUDES
PRIVATE
${CMAKE_CURRENT_BINARY_DIR}/private
${_PRVDIR}
${TARGET_ROOT}/../libmp3lame
${TARGET_ROOT}/../mpglib
PUBLIC
${CMAKE_CURRENT_BINARY_DIR}/public
${_PUBDIR}
)
list( APPEND DEFINES

4
cmake-proxies/lib-widget-extra/CMakeLists.txt

@ -1,6 +1,8 @@
add_library( ${TARGET} STATIC )
def_vars()
list( APPEND SOURCES
PRIVATE
${TARGET_ROOT}/NonGuiThread.cpp
@ -13,7 +15,7 @@ list( APPEND INCLUDES
list( APPEND LIBRARIES
PRIVATE
wxwidgets
wxWidgets
)
organize_source( "${TARGET_ROOT}" "" "${SOURCES}" )

15
cmake-proxies/libflac/CMakeLists.txt

@ -1,7 +1,11 @@
# FIXME: Once switch to cmake is made, remove Windows pragmas
# from AudacityApp.cpp and change target name to "flac/flac++"
add_library( ${TARGET} STATIC )
add_library( ${TARGET}++ STATIC )
def_vars()
list( APPEND SOURCES
PRIVATE
@ -48,7 +52,7 @@ list( APPEND SOURCES++
list( APPEND INCLUDES
PRIVATE
${CMAKE_CURRENT_BINARY_DIR}/private
${_PRVDIR}
${TARGET_ROOT}/src/libFLAC/include
PUBLIC
${TARGET_ROOT}/include
@ -62,8 +66,9 @@ list( APPEND DEFINES
)
list( APPEND LIBRARIES
PRIVATE
PUBLIC
libogg
libflac++
)
list( APPEND LIBRARIES++
@ -72,7 +77,7 @@ list( APPEND LIBRARIES++
)
set( CPU_IS_BIG_ENDIAN ${WORDS_BIGENDIAN} )
set( CPU_IS_LITTLE_ENDIAN NOT ${WORDS_BIGENDIAN} )
set( CPU_IS_LITTLE_ENDIAN !${WORDS_BIGENDIAN} )
set( FLAC__HAS_OGG 1 )
@ -83,16 +88,12 @@ configure_file( config.h.in private/config.h )
organize_source( "${TARGET_ROOT}" "" "${SOURCES}" )
target_sources( ${TARGET} PRIVATE ${SOURCES} )
target_compile_definitions( ${TARGET} PRIVATE ${DEFINES} )
target_compile_features( ${TARGET} PRIVATE ${FEATURES} )
target_compile_options( ${TARGET} PRIVATE ${OPTIONS} )
target_include_directories( ${TARGET} PRIVATE ${INCLUDES} )
target_link_libraries( ${TARGET} PRIVATE ${LIBRARIES} )
organize_source( "${TARGET_ROOT}" "" "${SOURCES++}" )
target_sources( ${TARGET}++ PRIVATE ${SOURCES++} )
target_compile_definitions( ${TARGET}++ PRIVATE ${DEFINES} )
target_compile_features( ${TARGET}++ PRIVATE ${FEATURES} )
target_compile_options( ${TARGET}++ PRIVATE ${OPTIONS} )
target_include_directories( ${TARGET}++ PRIVATE ${INCLUDES} )
target_link_libraries( ${TARGET}++ PRIVATE ${LIBRARIES++} )

10
cmake-proxies/libid3tag/CMakeLists.txt

@ -1,6 +1,8 @@
add_library( ${TARGET} STATIC )
def_vars()
list( APPEND SOURCES
PRIVATE
${TARGET_ROOT}/compat.c
@ -23,7 +25,7 @@ list( APPEND SOURCES
list( APPEND INCLUDES
PRIVATE
${CMAKE_CURRENT_BINARY_DIR}/private
${_PRVDIR}
$<$<PLATFORM_ID:Windows>:$ENV{WXWIN}/src/zlib>
PUBLIC
${TARGET_ROOT}
@ -31,18 +33,18 @@ list( APPEND INCLUDES
list( APPEND OPTIONS
PRIVATE
$<$<C_COMPILER_ID:GNU>:-Wno-implicit-function-declaration>
$<$<C_COMPILER_ID:AppleClang,Clang,GNU>:-Wno-implicit-function-declaration>
)
list( APPEND LIBRARIES
PRIVATE
wxwidgets
wxWidgets
)
configure_file( config.h.in private/config.h )
organize_source( "${TARGET_ROOT}" "src" "${SOURCES}" )
target_sources( ${TARGET} PRIVATE ${SOURCES} )
target_compile_definitions( ${TARGET} PRIVATE ${DEFINES} )
target_compile_options( ${TARGET} PRIVATE ${OPTIONS} )
target_include_directories( ${TARGET} PRIVATE ${INCLUDES} )
target_link_libraries( ${TARGET} PRIVATE ${LIBRARIES} )

11
cmake-proxies/libmad/CMakeLists.txt

@ -1,6 +1,8 @@
add_library( ${TARGET} STATIC )
def_vars()
list( APPEND SOURCES
PRIVATE
${TARGET_ROOT}/bit.c
@ -18,9 +20,9 @@ list( APPEND SOURCES
list( APPEND INCLUDES
PRIVATE
${CMAKE_CURRENT_BINARY_DIR}/private
${_PRVDIR}
PUBLIC
${CMAKE_CURRENT_BINARY_DIR}/public
${_PUBDIR}
${TARGET_ROOT}
)
@ -34,13 +36,12 @@ list( APPEND DEFINES
list( APPEND OPTIONS
PRIVATE
$<$<IN_LIST:${CMAKE_C_COMPILER_ID},GNU;Clang;AppleClang>:-Wall>
$<$<C_COMPILER_ID:AppleClang,Clang,GNU>:-Wall>
)
configure_file( config.h.in private/config.h )
set( FPM FPM_DEFAULT )
configure_file( config.h.in private/config.h )
configure_file( mad.h.in public/mad.h )
organize_source( "${TARGET_ROOT}" "" "${SOURCES}" )

11
cmake-proxies/libnyquist/CMakeLists.txt

@ -1,6 +1,8 @@
add_library( ${TARGET} STATIC )
def_vars()
list( APPEND SOURCES
PRIVATE
# libnyquist
@ -270,11 +272,8 @@ list( APPEND INCLUDES
${TARGET_ROOT}/nyquist/nyqstk/include
${TARGET_ROOT}/nyquist/tran
${TARGET_ROOT}/nyquist/xlisp
$<$<PLATFORM_ID:Darwin>:${TARGET_ROOT}/nyquist/sys/unix>
$<$<PLATFORM_ID:Linux>:${TARGET_ROOT}/nyquist/sys/unix>
$<$<PLATFORM_ID:Windows>:${TARGET_ROOT}/nyquist/sys/win/msvc>
$<$<BOOL:${UNIX}>:${TARGET_ROOT}/nyquist/sys/unix>
$<$<NOT:$<BOOL:${UNIX}>>:${TARGET_ROOT}/nyquist/sys/win/msvc>
PUBLIC
${TARGET_ROOT}
)
@ -283,7 +282,7 @@ list( APPEND DEFINES
PRIVATE
CMTSTUFF
EXT
$<$<PLATFORM_ID:Windows>:_LIB WIN32 D_LIB>
$<$<PLATFORM_ID:Windows>:WIN32>
)
list( APPEND OPTIONS

4
cmake-proxies/libogg/CMakeLists.txt

@ -1,6 +1,8 @@
add_library( ${TARGET} STATIC )
def_vars()
list( APPEND SOURCES
PRIVATE
${TARGET_ROOT}/src/bitwise.c
@ -9,7 +11,7 @@ list( APPEND SOURCES
list( APPEND INCLUDES
PUBLIC
${CMAKE_CURRENT_BINARY_DIR}/public
${_PUBDIR}
${TARGET_ROOT}/include
)

2
cmake-proxies/libscorealign/CMakeLists.txt

@ -1,6 +1,8 @@
add_library( ${TARGET} STATIC )
def_vars()
list( APPEND SOURCES
PRIVATE
${TARGET_ROOT}/audioreader.cpp

16
cmake-proxies/libsndfile/CMakeLists.txt

@ -100,13 +100,11 @@ list( APPEND OPTIONS
$<$<C_COMPILER_ID:MSVC>:/wd4996>
)
if( CMAKE_SYSTEM_NAME MATCHES "Windows" )
cmake_push_check_state(RESET)
if( CMAKE_C_COMPILER_ID MATCHES "MSVC" )
cmake_push_check_state( RESET )
set( CMAKE_EXTRA_INCLUDE_FILES "BaseTsd.h" )
check_type_size( "SSIZE_T" SIZEOF_SSIZE LANGUAGE C )
list( APPEND DEFINES
ssize_t=SSIZE_T
)
list( APPEND DEFINES ssize_t=SSIZE_T )
cmake_pop_check_state()
else()
check_type_size( "ssize_t" SIZEOF_SSIZE LANGUAGE C )
@ -138,7 +136,7 @@ if( CMAKE_SYSTEM_NAME MATCHES "Windows" )
endif()
set( CPU_IS_BIG_ENDIAN ${WORDS_BIGENDIAN} )
set( CPU_IS_LITTLE_ENDIAN NOT ${WORDS_BIGENDIAN} )
set( CPU_IS_LITTLE_ENDIAN !${WORDS_BIGENDIAN} )
set( HAVE_EXTERNAL_LIBS 0 )
set( VERSION "1.0.24" )
@ -149,7 +147,7 @@ set( PACKAGE_VERSION ${VERSION} )
# Does compiler support "flexible array members"
try_compile( HAVE_FLEXIBLE_ARRAY
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/famcheck.c
${_SRCDIR}/famcheck.c
LINK_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES}
OUTPUT_VARIABLE c_out
)
@ -157,7 +155,7 @@ try_compile( HAVE_FLEXIBLE_ARRAY
# Determine how the CPU clips when doing float to int conversions
try_run( r_rc c_rc
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/clipcheck.c
${_SRCDIR}/clipcheck.c
LINK_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES}
RUN_OUTPUT_VARIABLE r_out
COMPILE_OUTPUT_VARIABLE c_out
@ -165,7 +163,7 @@ try_run( r_rc c_rc
if( NOT c_rc )
message( STATUS "${c_out}" )
message( FATAL_ERROR "${CMAKE_CURRENT_SOURCE_DIR}/clipcheck.c compile failed:" )
message( FATAL_ERROR "${_SRCDIR}/clipcheck.c compile failed:" )
endif()
list( GET r_out 0 CPU_CLIPS_POSITIVE )

50
cmake-proxies/libsoxr/CMakeLists.txt

@ -1,6 +1,8 @@
add_library( ${TARGET} STATIC )
def_vars()
set(CMAKE_MODULE_PATH ${TARGET_ROOT}/cmake/Modules )
list( APPEND SOURCES
@ -26,7 +28,7 @@ list( APPEND SOURCES
list( APPEND INCLUDES
PRIVATE
${CMAKE_CURRENT_BINARY_DIR}/private
${_PRVDIR}
PUBLIC
${TARGET_ROOT}/src
)
@ -40,20 +42,21 @@ list( APPEND DEFINES
list( APPEND OPTIONS
PRIVATE
$<$<IN_LIST:${CMAKE_C_COMPILER_ID},GNU;Clang;AppleClang>:-Wall>
$<$<C_COMPILER_ID:AppleClang,Clang,GNU>:
-Wconversion
-Wall
-Wextra
-pedantic
-Wundef
-Wpointer-arith
-Wno-long-long
-Wnested-externs
-Wmissing-prototypes
-Wstrict-prototypes
>
$<$<C_COMPILER_ID:AppleClang,Clang>:-Wno-keyword-macro>
)
if( CMAKE_C_COMPILER_ID MATCHES "GNU|.*Clang" )
list( APPEND OPTIONS
PRIVATE
-Wconversion -Wall -Wextra -pedantic -Wundef -Wpointer-arith -Wno-long-long
$<$<C_COMPILER_ID:Clang>:-Wno-keyword-macro>
$<$<COMPILE_LANGUAGE:CXX>:
-std=gnu89 -Wnested-externs -Wmissing-prototypes -Wstrict-prototypes
>
)
endif()
set( HAVE_BIGENDIAN ${WORDS_BIGENDIAN} )
set( AVCODEC_FOUND NO )
@ -61,21 +64,22 @@ set( AVUTIL_FOUND NO )
set( WITH_PFFFT YES )
set( WITH_CR32 YES )
set( WITH_CR32S YES )
set( WITH_CR32S NO )
set( WITH_CR64 YES )
set( WITH_CR64S YES )
set( WITH_CR64S NO )
set( WITH_VR32 YES )
# Copied from libsoxr CMakeLists.txt
if( WITH_CR32S )
find_package( SIMD32 )
set( WITH_CR32S ${SIMD32_FOUND} )
# list( APPEND OPTIONS ${SIMD32_C_FLAGS} )
find_package( SIMD32 )
if( SIMD32_FOUND )
set( WITH_CR32S ON )
string( STRIP "${SIMD32_C_FLAGS}" SIMD32_C_FLAGS )
list( APPEND OPTIONS ${SIMD32_C_FLAGS} )
endif()
if( WITH_CR64S )
find_package( SIMD64 )
set( WITH_CR64S ${SIMD64_FOUND} )
find_package( SIMD64 )
if( SIMD64_FOUND )
set( WITH_CR64S ON )
string( STRIP "${SIMD64_C_FLAGS}" SIMD64_C_FLAGS )
list( APPEND OPTIONS ${SIMD64_C_FLAGS} )
endif()

2
cmake-proxies/libvamp/CMakeLists.txt

@ -2,6 +2,8 @@
add_library( ${TARGET} STATIC )
add_library( ${TARGET}-hostsdk ALIAS ${TARGET} )
def_vars()
list( APPEND SOURCES
PRIVATE
${TARGET_ROOT}/src/vamp-hostsdk/PluginBufferingAdapter.cpp

5
cmake-proxies/libvorbis/CMakeLists.txt

@ -3,6 +3,8 @@ add_library( ${TARGET} STATIC )
add_library( ${TARGET}enc ALIAS ${TARGET} )
add_library( ${TARGET}file ALIAS ${TARGET} )
def_vars()
list( APPEND SOURCES
PRIVATE
${TARGET_ROOT}/lib/analysis.c
@ -31,9 +33,8 @@ list( APPEND SOURCES
list( APPEND INCLUDES
PRIVATE
${CMAKE_CURRENT_BINARY_DIR}/private
${_PRVDIR}
${TARGET_ROOT}/lib
${LIBOGG_INCLUDES}
PUBLIC
${TARGET_ROOT}/include
)

20
cmake-proxies/lv2/CMakeLists.txt

@ -166,13 +166,13 @@ macro( bld name packages define sources )
break()
endif()
list( APPEND libs PRIVATE
"PkgConfig::${pkg}"
list( APPEND libs
PRIVATE
"PkgConfig::${pkg}"
)
endforeach()
if( NOT missing )
list( APPEND DEFINES
PRIVATE
${define}
@ -199,8 +199,8 @@ if( WIN32 )
set( LILV_DIR_SEP "\\\\" )
set( LILV_DEFAULT_LV2_PATH "%APPDATA%\\LV2;%COMMONPROGRAMFILES%\\LV2" )
set( SUIL_MODULE_DIR "C:\\Windows\\System32" )
set( SUIL_DIR_SEP "\\\\" )
set( SUIL_MODULE_DIR "" )
set( SUIL_DIR_SEP "" )
set( SUIL_GTK2_LIB_NAME "libgtk-x11-2.0.so.0" )
set( SUIL_GTK3_LIB_NAME "libgtk-x11-3.0.so.0" )
set( SUIL_MODULE_PREFIX "" )
@ -210,8 +210,8 @@ elseif( APPLE )
set( LILV_DIR_SEP "/" )
set( LILV_DEFAULT_LV2_PATH "~/Library/Audio/Plug-Ins/LV2:~/.lv2:/usr/local/lib/lv2:/usr/lib/lv2:/Library/Audio/Plug-Ins/LV2" )
set( SUIL_MODULE_DIR "/usr/local/lib/suil-0" )
set( SUIL_DIR_SEP "/" )
set( SUIL_MODULE_DIR "" )
set( SUIL_DIR_SEP "" )
set( SUIL_GTK2_LIB_NAME "libgtk-x11-2.0.so.0" )
set( SUIL_GTK3_LIB_NAME "libgtk-x11-3.0.so.0" )
set( SUIL_MODULE_PREFIX "lib" )
@ -221,8 +221,8 @@ elseif( UNIX )
set( LILV_DIR_SEP "/" )
set( LILV_DEFAULT_LV2_PATH "~/.lv2:/usr/lib/lv2:/usr/local/lib/lv2" )
set( SUIL_MODULE_DIR "/usr/local/lib/suil-0" )
set( SUIL_DIR_SEP "/" )
set( SUIL_MODULE_DIR "" )
set( SUIL_DIR_SEP "" )
set( SUIL_GTK2_LIB_NAME "libgtk-x11-2.0.so.0" )
set( SUIL_GTK3_LIB_NAME "libgtk-x11-3.0.so.0" )
set( SUIL_MODULE_PREFIX "lib" )
@ -269,7 +269,7 @@ configure_file( sratom_config.h.in "${_PRVDIR}/sratom_config.h" )
configure_file( suil_config.h.in "${_PRVDIR}/suil_config.h" )
organize_source( "${TARGET_ROOT}" "" "${SOURCES} ${HEADERS}" )
target_sources( ${TARGET} PRIVATE ${SOURCES} ${HEADERS} )# ${stamp} )
target_sources( ${TARGET} PRIVATE ${SOURCES} ${HEADERS} )
target_compile_definitions( ${TARGET} PRIVATE ${DEFINES} )
target_include_directories( ${TARGET} PRIVATE ${INCLUDES} )

2
cmake-proxies/mod-nyq-bench/CMakeLists.txt

@ -24,7 +24,7 @@ list( APPEND LIBRARIES
Audacity
libnyquist
portaudio-v19
wxwidgets
wxWidgets
)
set_target_property_all( ${TARGET} LIBRARY_OUTPUT_DIRECTORY "${_DEST}/modules" )

2
cmake-proxies/mod-script-pipe/CMakeLists.txt

@ -26,8 +26,8 @@ list( APPEND DEFINES
list( APPEND LIBRARIES
PRIVATE
wxwidgets
Audacity
wxWidgets
)
set_target_property_all( ${TARGET} LIBRARY_OUTPUT_DIRECTORY "${_DEST}/modules" )

265
cmake-proxies/portaudio-v19/CMakeLists.txt

@ -1,6 +1,62 @@
add_library( ${TARGET} STATIC )
def_vars()
set( CMAKE_MODULE_PATH ${TARGET_ROOT}/cmake_support )
# Define the platform specific interface options
if( CMAKE_SYSTEM_NAME MATCHES "Windows" )
option( use_pa_ds "Enable the portaudio DirectSound interface if available" YES )
option( use_pa_wasapi "Enable the portaudio WASAPI interface if available" YES )
option( use_pa_wmme "Enable the portaudio WMME interface if available" YES )
elseif( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
option( use_pa_coreaudio "Enable the portaudio CoreAudio interface if available" YES )
elseif( CMAKE_SYSTEM_NAME MATCHES "Linux|FreeBSD" )
option( use_pa_alsa "Enable the portaudio ALSA interface if available" YES )
if( use_pa_alsa )
find_package( ALSA )
if( NOT ALSA_FOUND )
set( use_pa_alsa NO CACHE INTERNAL "" )
endif()
endif()
endif()
# Look for OSS if the user wants it
option( use_pa_oss "Use the OSS audio interface if available" YES )
if( use_pa_oss )
find_path( OSS_INCLUDE NAMES sys/soundcard.h )
if( OSS_INCLUDE )
set( OSS_INCLUDE_DIRS ${OSS_INCLUDE} )
endif()
find_library( OSS_LIBRARY NAMES ossaudio )
if( OSS_LIBRARY )
set( OSS_LIBRARIES ${OSS_LIBRARY} )
endif()
if( NOT OSS_INCLUDE_DIRS )
set( use_pa_oss NO CACHE INTERNAL "" )
endif()
endif()
# Look for JACK if the user wants it
option( use_pa_jack "Use the JACK audio interface if available" YES )
if( use_pa_jack )
# Provide an option that determines if the libraries are loaded
# dynamically at run time or statically linked at build time
option( disable_dynamic_jack "Disable dynamic loading of JACK libraries" YES )
# Find it
find_package( Jack )
if( NOT JACK_FOUND)
set( use_pa_jack NO CACHE INTERNAL "" )
endif()
else()
# Make sure to reset in case user reconfigures later
set( disable_dynamic_jack NO CACHE INTERNAL "" )
endif()
list( APPEND SOURCES
PRIVATE
${TARGET_ROOT}/src/common/pa_allocation.c
@ -14,130 +70,141 @@ list( APPEND SOURCES
${TARGET_ROOT}/src/common/pa_ringbuffer.c
${TARGET_ROOT}/src/common/pa_stream.c
${TARGET_ROOT}/src/common/pa_trace.c
)
list( APPEND INCLUDES
PRIVATE
${TARGET_ROOT}/src/common
PUBLIC
${TARGET_ROOT}/include
)
if( WIN32 )
list( APPEND DEFINES
PUBLIC
PA_USE_DS=1
PA_USE_WASAPI=1
PA_USE_WMME=1
)
list( APPEND SOURCES
PRIVATE
${TARGET_ROOT}/src/hostapi/dsound/pa_win_ds.c
${TARGET_ROOT}/src/hostapi/dsound/pa_win_ds_dynlink.c
${TARGET_ROOT}/src/hostapi/wasapi/pa_win_wasapi.c
${TARGET_ROOT}/src/hostapi/wmme/pa_win_wmme.c
$<$<PLATFORM_ID:Windows>:
${TARGET_ROOT}/src/os/win/pa_win_coinitialize.c
${TARGET_ROOT}/src/os/win/pa_win_hostapis.c
${TARGET_ROOT}/src/os/win/pa_win_util.c
${TARGET_ROOT}/src/os/win/pa_win_waveformat.c
${TARGET_ROOT}/src/os/win/pa_win_wdmks_utils.c
${TARGET_ROOT}/src/os/win/pa_x86_plain_converters.c
)
list( APPEND INCLUDES
PRIVATE
${TARGET_ROOT}/src/hostapi/dsound
${TARGET_ROOT}/src/os/win
)
elseif( APPLE )
list( APPEND DEFINES
PUBLIC
PA_USE_COREAUDIO=1
)
>
list( APPEND SOURCES
PRIVATE
$<$<PLATFORM_ID:Darwin>:
${TARGET_ROOT}/src/hostapi/coreaudio/pa_mac_core.c
${TARGET_ROOT}/src/hostapi/coreaudio/pa_mac_core_blocking.c
${TARGET_ROOT}/src/hostapi/coreaudio/pa_mac_core_utilities.c
>
$<$<PLATFORM_ID:Darwin,Linux,FreeBSD>:
${TARGET_ROOT}/src/os/unix/pa_unix_hostapis.c
${TARGET_ROOT}/src/os/unix/pa_unix_util.c
)
>
list( APPEND INCLUDES
PRIVATE
${TARGET_ROOT}/src/hostapi/coreaudio
${TARGET_ROOT}/src/os/unix
)
list( APPEND LIBRARIES
INTERFACE
"-framework CoreAudio"
)
elseif( UNIX )
find_package(ALSA)
if( ALSA_FOUND )
list( APPEND DEFINES
PUBLIC
PA_USE_ALSA=1
)
list( APPEND SOURCES
PRIVATE
${TARGET_ROOT}/src/hostapi/alsa/pa_linux_alsa.c
)
list( APPEND INCLUDES
PRIVATE
${ALSA_INCLUDE_DIRS}
)
list( APPEND LIBRARIES
INTERFACE
${ALSA_LIBRARIES}
)
endif()
$<$<BOOL:${use_pa_ds}>:
${TARGET_ROOT}/src/hostapi/dsound/pa_win_ds.c
${TARGET_ROOT}/src/hostapi/dsound/pa_win_ds_dynlink.c
>
list( APPEND SOURCES
PRIVATE
${TARGET_ROOT}/src/os/unix/pa_unix_hostapis.c
${TARGET_ROOT}/src/os/unix/pa_unix_util.c
)
$<$<BOOL:${use_pa_wasapi}>:
${TARGET_ROOT}/src/hostapi/wasapi/pa_win_wasapi.c
>
list( APPEND INCLUDES
PRIVATE
${TARGET_ROOT}/src/os/unix
)
endif()
$<$<BOOL:${use_pa_wmme}>:
${TARGET_ROOT}/src/hostapi/wmme/pa_win_wmme.c
>
set( CMAKE_MODULE_PATH ${TARGET_ROOT}/cmake_support )
$<$<BOOL:${use_pa_alsa}>:
${TARGET_ROOT}/src/hostapi/alsa/pa_linux_alsa.c
>
find_package(Jack)
if( JACK_FOUND )
list( APPEND DEFINES
PUBLIC
PA_USE_JACK=1
)
$<$<BOOL:${use_pa_oss}>:
${TARGET_ROOT}/src/hostapi/oss/pa_unix_oss.c