mirror of
https://github.com/cookiengineer/audacity
synced 2026-01-15 17:11:23 +01:00
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
This commit is contained in:
@@ -63,6 +63,12 @@ set( CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake-proxies/cmake-modules)
|
|||||||
set( CMAKE_CXX_STANDARD 14 )
|
set( CMAKE_CXX_STANDARD 14 )
|
||||||
set( CMAKE_CXX_STANDARD_REQUIRED ON )
|
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
|
# Our very own project
|
||||||
project( Audacity )
|
project( Audacity )
|
||||||
|
|
||||||
@@ -118,10 +124,15 @@ if( HAVE_LIBM )
|
|||||||
list( APPEND CMAKE_REQUIRED_LIBRARIES -lm )
|
list( APPEND CMAKE_REQUIRED_LIBRARIES -lm )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Add the dynamic linker library (if found) to the list of required libraries
|
# Add the dynamic linker library (if needed) to the list of required libraries
|
||||||
check_library_exists( dl dlopen "" HAVE_LIBDL )
|
list( APPEND CMAKE_REQUIRED_LIBRARIES ${CMAKE_DL_LIBS} )
|
||||||
if( HAVE_LIBDL )
|
|
||||||
list( APPEND CMAKE_REQUIRED_LIBRARIES -ldl )
|
# 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()
|
endif()
|
||||||
|
|
||||||
# Make sure they're used during the link steps
|
# 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
|
# Various common checks whose results are used by the various targets
|
||||||
test_big_endian( WORDS_BIGENDIAN )
|
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_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( "assert.h" HAVE_ASSERT_H )
|
||||||
|
check_include_file( "byteswap.h" HAVE_BYTESWAP_H )
|
||||||
check_include_file( "errno.h" HAVE_ERRNO_H )
|
check_include_file( "errno.h" HAVE_ERRNO_H )
|
||||||
check_include_file( "fcntl.h" HAVE_FCNTL_H )
|
check_include_file( "fcntl.h" HAVE_FCNTL_H )
|
||||||
check_include_file( "fenv.h" HAVE_FENV_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/param.h" HAVE_SYS_PARAM_H )
|
||||||
check_include_file( "sys/stat.h" HAVE_SYS_STAT_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/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( fileno "stdio.h" HAVE_FILENO )
|
||||||
check_symbol_exists( flock "sys/file.h" HAVE_FLOCK )
|
check_symbol_exists( flock "sys/file.h" HAVE_FLOCK )
|
||||||
check_symbol_exists( fork "unistd.h" HAVE_FORK )
|
check_symbol_exists( fork "unistd.h" HAVE_FORK )
|
||||||
check_symbol_exists( fsync "unistd.h" HAVE_FSYNC )
|
check_symbol_exists( fsync "unistd.h" HAVE_FSYNC )
|
||||||
check_symbol_exists( ftruncate "unistd.h" HAVE_FTRUNCATE )
|
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( gettimeofday "sys/time.h" HAVE_GETTIMEOFDAY )
|
||||||
check_symbol_exists( gmtime "time.h" HAVE_GMTIME )
|
check_symbol_exists( gmtime "time.h" HAVE_GMTIME )
|
||||||
check_symbol_exists( gmtime_r "time.h" HAVE_GMTIME_R )
|
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( lround "math.h" HAVE_LROUND )
|
||||||
check_symbol_exists( lstat "sys/stat.h" HAVE_LSTAT )
|
check_symbol_exists( lstat "sys/stat.h" HAVE_LSTAT )
|
||||||
check_symbol_exists( memcpy "string.h" HAVE_MEMCPY )
|
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( mlock "sys/mman.h" HAVE_MLOCK )
|
||||||
check_symbol_exists( pipe "unistd.h" HAVE_PIPE )
|
check_symbol_exists( pipe "unistd.h" HAVE_PIPE )
|
||||||
check_symbol_exists( posix_fadvise "fcntl.h" HAVE_POSIX_FADVISE )
|
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( _LIBDIR "${CMAKE_INSTALL_LIBDIR}/audacity" )
|
||||||
set( _RPATH "\$ORIGIN/../${_LIBDIR}" )
|
set( _RPATH "\$ORIGIN/../${_LIBDIR}" )
|
||||||
set( _DATADIR "${CMAKE_INSTALL_DATADIR}" )
|
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
|
# Helper to organize sources into folders for the IDEs
|
||||||
macro( organize_source root prefix sources )
|
macro( organize_source root prefix sources )
|
||||||
set( cleaned )
|
set( cleaned )
|
||||||
foreach(source ${sources})
|
foreach( source ${sources} )
|
||||||
# Remove generator expressions
|
# Remove generator expressions
|
||||||
string( REGEX REPLACE ".*>:(.*)>" "\\1" source "${source}" )
|
string( REGEX REPLACE ".*>:(.*)>*" "\\1" source "${source}" )
|
||||||
|
string( REPLACE ">" "" source "${source}" )
|
||||||
|
|
||||||
# Remove keywords
|
# Remove keywords
|
||||||
string( REGEX REPLACE "^[A-Z]+$" "" source "${source}" )
|
string( REGEX REPLACE "^[A-Z]+$" "" source "${source}" )
|
||||||
@@ -283,29 +333,24 @@ endfunction()
|
|||||||
# Helper to retrieve the settings returned from pkg_check_modules()
|
# Helper to retrieve the settings returned from pkg_check_modules()
|
||||||
macro( get_package_interface package )
|
macro( get_package_interface package )
|
||||||
set( INCLUDES
|
set( INCLUDES
|
||||||
INTERFACE
|
|
||||||
${${package}_INCLUDE_DIRS}
|
${${package}_INCLUDE_DIRS}
|
||||||
)
|
)
|
||||||
|
|
||||||
set( CLFAGS
|
set( COPTS
|
||||||
INTERFACE
|
|
||||||
${${package}_CFLAGS}
|
${${package}_CFLAGS}
|
||||||
${${package}_CFLAGS_OTHER}
|
${${package}_CFLAGS_OTHER}
|
||||||
)
|
)
|
||||||
|
|
||||||
set( LDFLAGS
|
set( LOPTS
|
||||||
INTERFACE
|
|
||||||
${${package}_LDFLAGS}
|
${${package}_LDFLAGS}
|
||||||
${${package}_LDFLAGS_OTHER}
|
${${package}_LDFLAGS_OTHER}
|
||||||
)
|
)
|
||||||
|
|
||||||
set( LINKDIRS
|
set( LINKDIRS
|
||||||
INTERFACE
|
|
||||||
${${package}_LIBRARY_DIRS}
|
${${package}_LIBRARY_DIRS}
|
||||||
)
|
)
|
||||||
|
|
||||||
set( LIBRARIES
|
set( LIBRARIES
|
||||||
INTERFACE
|
|
||||||
${${package}_LIBRARIES}
|
${${package}_LIBRARIES}
|
||||||
)
|
)
|
||||||
endmacro()
|
endmacro()
|
||||||
@@ -342,4 +387,3 @@ add_subdirectory( "cmake-proxies/mod-script-pipe" )
|
|||||||
print_properties(TARGET "Audacity")
|
print_properties(TARGET "Audacity")
|
||||||
#]]
|
#]]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
# packages A list of packages required for this target in pkg-config
|
||||||
# format.
|
# 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
|
# Extract the list of packages from the function args
|
||||||
list( SUBLIST ARGV 5 -1 packages )
|
list( SUBLIST ARGV 5 -1 packages )
|
||||||
|
|
||||||
@@ -40,6 +40,9 @@ function( addlib dir name symbol required check ) #packages )
|
|||||||
option( ${enable} "Enable ${name} library" ON )
|
option( ${enable} "Enable ${name} library" ON )
|
||||||
endif()
|
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.
|
# Bail if the target isn't enabled.
|
||||||
if( NOT ${enable} )
|
if( NOT ${enable} )
|
||||||
message( STATUS "========== ${name} disabled ==========" )
|
message( STATUS "========== ${name} disabled ==========" )
|
||||||
@@ -65,50 +68,30 @@ function( addlib dir name symbol required check ) #packages )
|
|||||||
|
|
||||||
message( STATUS "========== Configuring ${name} ==========" )
|
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.
|
# Check for the system package if the user prefers it.
|
||||||
if( ${system} )
|
if( ${system} )
|
||||||
# Look them up
|
# Look them up
|
||||||
pkg_check_modules( ${symbol} ${packages} )
|
pkg_check_modules( ${TARGET} ${packages} )
|
||||||
if( ${symbol}_FOUND )
|
if( ${TARGET}_FOUND )
|
||||||
message( STATUS "Using '${name}' system library" )
|
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
|
# 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( ${symbol} )
|
get_package_interface( ${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} )
|
||||||
target_compile_options( ${TARGET} INTERFACE ${CFLAGS} )
|
target_compile_options( ${TARGET} INTERFACE ${COPTS} )
|
||||||
target_link_directories( ${TARGET} INTERFACE ${LINKDIRS} )
|
target_link_directories( ${TARGET} INTERFACE ${LINKDIRS} )
|
||||||
target_link_options( ${TARGET} INTERFACE ${LDFLAGS} )
|
target_link_options( ${TARGET} INTERFACE ${LOPTS} )
|
||||||
target_link_libraries( ${TARGET} INTERFACE ${LIBRARIES} )
|
target_link_libraries( ${TARGET} INTERFACE ${LIBRARIES} )
|
||||||
|
|
||||||
# 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 )
|
|
||||||
|
|
||||||
# Create the alias
|
|
||||||
add_library( "lib${package}" ALIAS ${TARGET} )
|
|
||||||
endforeach()
|
|
||||||
|
|
||||||
# We are done...
|
|
||||||
return()
|
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# User want the local package or the system one wasn't found
|
||||||
|
if( NOT ${TARGET}_FOUND )
|
||||||
message( STATUS "Using '${name}' local library" )
|
message( STATUS "Using '${name}' local library" )
|
||||||
|
|
||||||
# Pull in the target config
|
# Pull in the target config
|
||||||
@@ -126,16 +109,33 @@ function( addlib dir name symbol required check ) #packages )
|
|||||||
set_target_properties( ${target} PROPERTIES FOLDER "lib-src" )
|
set_target_properties( ${target} PROPERTIES FOLDER "lib-src" )
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
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 )
|
||||||
|
|
||||||
|
# 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()
|
endfunction()
|
||||||
|
|
||||||
# Required libraries
|
# Required libraries
|
||||||
#
|
#
|
||||||
# directory option symbol req chk version
|
# 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( FileDialog FileDialog FILEDIALOG YES YES "" )
|
||||||
addlib( expat expat EXPAT YES YES "" )
|
addlib( expat expat EXPAT YES YES "" )
|
||||||
addlib( lame lame LAME YES YES "lame >= 3.100" )
|
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( libsndfile sndfile SNDFILE YES YES "sndfile >= 1.0.24" )
|
||||||
addlib( libsoxr soxr SOXR YES YES "soxr >= 0.1.1" )
|
addlib( libsoxr soxr SOXR YES YES "soxr >= 0.1.1" )
|
||||||
addlib( portaudio-v19 portaudio PORTAUDIO YES YES "" )
|
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( libmad mad LIBMAD NO YES "mad >= 2.3" )
|
||||||
addlib( libnyquist nyquist NYQUIST NO YES "" )
|
addlib( libnyquist nyquist NYQUIST NO YES "" )
|
||||||
addlib( libvamp vamp VAMP NO YES "vamp >= 2.5" "vamp-hostsdk >= 2.5" )
|
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( 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( 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( 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( portmixer portmixer PORTMIXER NO YES "" )
|
||||||
addlib( portsmf portsmf PORTSMF NO YES "portsmf >= 0.1" )
|
addlib( portsmf portsmf PORTSMF NO YES "portsmf >= 0.1" )
|
||||||
addlib( sbsms sbsms SBSMS NO YES "sbsms >= 2.0.2" )
|
addlib( sbsms sbsms SBSMS NO YES "sbsms >= 2.0.2" )
|
||||||
|
|||||||
@@ -1,12 +1,14 @@
|
|||||||
|
|
||||||
add_library( ${TARGET} STATIC )
|
add_library( ${TARGET} STATIC )
|
||||||
|
|
||||||
|
def_vars()
|
||||||
|
|
||||||
list( APPEND SOURCES
|
list( APPEND SOURCES
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${TARGET_ROOT}/FileDialog.cpp
|
${TARGET_ROOT}/FileDialog.cpp
|
||||||
$<$<PLATFORM_ID:Windows>:${TARGET_ROOT}/win/FileDialogPrivate.cpp>
|
$<$<BOOL:${wxIS_WIN}>:${TARGET_ROOT}/win/FileDialogPrivate.cpp>
|
||||||
$<$<PLATFORM_ID:Darwin>:${TARGET_ROOT}/mac/FileDialogPrivate.mm>
|
$<$<BOOL:${wxIS_MAC}>:${TARGET_ROOT}/mac/FileDialogPrivate.mm>
|
||||||
$<$<PLATFORM_ID:Linux>:${TARGET_ROOT}/gtk/FileDialogPrivate.cpp>
|
$<$<BOOL:${wxIS_GTK}>:${TARGET_ROOT}/gtk/FileDialogPrivate.cpp>
|
||||||
)
|
)
|
||||||
|
|
||||||
list( APPEND INCLUDES
|
list( APPEND INCLUDES
|
||||||
@@ -21,16 +23,15 @@ list( APPEND DEFINES
|
|||||||
|
|
||||||
list( APPEND OPTIONS
|
list( APPEND OPTIONS
|
||||||
PRIVATE
|
PRIVATE
|
||||||
$<$<PLATFORM_ID:Windows>:/permissive->
|
$<$<CXX_COMPILER_ID:MSVC>:/permissive->
|
||||||
$<$<PLATFORM_ID:Darwin>:-Wno-deprecated-declarations>
|
$<$<CXX_COMPILER_ID:AppleClang,Clang,GNU>:-Wno-deprecated-declarations>
|
||||||
$<$<PLATFORM_ID:Linux>:-Wno-deprecated-declarations>
|
|
||||||
)
|
)
|
||||||
|
|
||||||
list( APPEND LIBRARIES
|
list( APPEND LIBRARIES
|
||||||
PRIVATE
|
PRIVATE
|
||||||
wxwidgets
|
wxWidgets
|
||||||
PUBLIC
|
PUBLIC
|
||||||
$<$<PLATFORM_ID:Linux>:PkgConfig::GTK>
|
$<$<BOOL:${wxIS_GTK}>:PkgConfig::GTK>
|
||||||
)
|
)
|
||||||
|
|
||||||
organize_source( "${TARGET_ROOT}" "" "${SOURCES}" )
|
organize_source( "${TARGET_ROOT}" "" "${SOURCES}" )
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
|
|
||||||
add_library( ${TARGET} STATIC )
|
add_library( ${TARGET} STATIC )
|
||||||
|
|
||||||
|
def_vars()
|
||||||
|
|
||||||
list( APPEND SOURCES
|
list( APPEND SOURCES
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${TARGET_ROOT}/lib/xmlparse.c
|
${TARGET_ROOT}/lib/xmlparse.c
|
||||||
@@ -12,7 +14,7 @@ list( APPEND SOURCES
|
|||||||
|
|
||||||
list( APPEND INCLUDES
|
list( APPEND INCLUDES
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/private
|
${_PRVDIR}
|
||||||
PUBLIC
|
PUBLIC
|
||||||
${TARGET_ROOT}/lib
|
${TARGET_ROOT}/lib
|
||||||
)
|
)
|
||||||
@@ -22,10 +24,6 @@ list( APPEND DEFINES
|
|||||||
HAVE_EXPAT_CONFIG_H
|
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 )
|
if( WORDS_BIGENDIAN )
|
||||||
set( BYTEORDER 4321 )
|
set( BYTEORDER 4321 )
|
||||||
else( WORDS_BIGENDIAN )
|
else( WORDS_BIGENDIAN )
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
|
|
||||||
# Add our target and all of it's aliases
|
# Add our target and all of it's aliases
|
||||||
add_library( ${TARGET} INTERFACE )
|
add_library( ${TARGET} INTERFACE )
|
||||||
|
add_library( ${symbol} ALIAS ${TARGET} )
|
||||||
add_library( libavcodec ALIAS ${TARGET} )
|
add_library( libavcodec ALIAS ${TARGET} )
|
||||||
add_library( libavformat ALIAS ${TARGET} )
|
add_library( libavformat ALIAS ${TARGET} )
|
||||||
add_library( libavutil ALIAS ${TARGET} )
|
add_library( libavutil ALIAS ${TARGET} )
|
||||||
@@ -8,35 +9,35 @@ add_library( libavutil ALIAS ${TARGET} )
|
|||||||
# Pull in standard variables
|
# Pull in standard variables
|
||||||
def_vars()
|
def_vars()
|
||||||
|
|
||||||
message( STATUS "========== Configuring ${TARGET} ==========" )
|
message( STATUS "========== Configuring ${name} ==========" )
|
||||||
|
|
||||||
# Let the Audacity target know we're using ffmpeg
|
# 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
|
# 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
|
# 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
|
# Provide an option that determines if the libraries are loaded
|
||||||
# dynamically at run time or statically link to at build time
|
# dynamically at run time or statically linked at build time
|
||||||
option( disable_dynamic_loading "Disable dynamic loading of ${TARGET} libraries" NO)
|
option( disable_dynamic_${name} "Disable dynamic loading of ${name} libraries" NO)
|
||||||
|
|
||||||
# Look them up
|
# Look them up
|
||||||
pkg_check_modules( ${TARGET} ${packages} )
|
pkg_check_modules( ${TARGET} ${packages} )
|
||||||
else()
|
else()
|
||||||
# Make sure to reset in case user reconfigures between local/system
|
# 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()
|
endif()
|
||||||
|
|
||||||
# If the system packages were found
|
# If the system packages were found
|
||||||
if( ${TARGET}_FOUND )
|
if( ${TARGET}_FOUND )
|
||||||
message( STATUS "Using '${TARGET}' system library" )
|
message( STATUS "Using '${name}' system library" )
|
||||||
|
|
||||||
# Pull in the package settings
|
# Pull in the package settings
|
||||||
get_package_interface( ${TARGET} )
|
get_package_interface( ${TARGET} )
|
||||||
else()
|
else()
|
||||||
message( STATUS "Using '${TARGET}' local library" )
|
message( STATUS "Using '${name}' local library" )
|
||||||
|
|
||||||
# Otherwise define the local settings
|
# Otherwise define the local settings
|
||||||
list( APPEND INCLUDES
|
list( APPEND INCLUDES
|
||||||
@@ -47,8 +48,8 @@ endif()
|
|||||||
|
|
||||||
# And add the settings to the target
|
# And add the settings to the target
|
||||||
target_include_directories( ${TARGET} INTERFACE ${INCLUDES} )
|
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_directories( ${TARGET} INTERFACE ${LINKDIRS} )
|
||||||
target_link_options( ${TARGET} INTERFACE ${LDFLAGS} )
|
target_link_options( ${TARGET} INTERFACE ${LOPTS} )
|
||||||
target_link_libraries( ${TARGET} INTERFACE ${LIBRARIES} )
|
target_link_libraries( ${TARGET} INTERFACE ${LIBRARIES} )
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
|
|
||||||
add_library( ${TARGET} STATIC )
|
add_library( ${TARGET} STATIC )
|
||||||
|
|
||||||
|
def_vars()
|
||||||
|
|
||||||
list( APPEND SOURCES
|
list( APPEND SOURCES
|
||||||
PRIVATE
|
PRIVATE
|
||||||
# libmp3lame
|
# libmp3lame
|
||||||
@@ -39,11 +41,11 @@ list( APPEND SOURCES
|
|||||||
|
|
||||||
list( APPEND INCLUDES
|
list( APPEND INCLUDES
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/private
|
${_PRVDIR}
|
||||||
${TARGET_ROOT}/../libmp3lame
|
${TARGET_ROOT}/../libmp3lame
|
||||||
${TARGET_ROOT}/../mpglib
|
${TARGET_ROOT}/../mpglib
|
||||||
PUBLIC
|
PUBLIC
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/public
|
${_PUBDIR}
|
||||||
)
|
)
|
||||||
|
|
||||||
list( APPEND DEFINES
|
list( APPEND DEFINES
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
|
|
||||||
add_library( ${TARGET} STATIC )
|
add_library( ${TARGET} STATIC )
|
||||||
|
|
||||||
|
def_vars()
|
||||||
|
|
||||||
list( APPEND SOURCES
|
list( APPEND SOURCES
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${TARGET_ROOT}/NonGuiThread.cpp
|
${TARGET_ROOT}/NonGuiThread.cpp
|
||||||
@@ -13,7 +15,7 @@ list( APPEND INCLUDES
|
|||||||
|
|
||||||
list( APPEND LIBRARIES
|
list( APPEND LIBRARIES
|
||||||
PRIVATE
|
PRIVATE
|
||||||
wxwidgets
|
wxWidgets
|
||||||
)
|
)
|
||||||
|
|
||||||
organize_source( "${TARGET_ROOT}" "" "${SOURCES}" )
|
organize_source( "${TARGET_ROOT}" "" "${SOURCES}" )
|
||||||
|
|||||||
@@ -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 )
|
||||||
add_library( ${TARGET}++ STATIC )
|
add_library( ${TARGET}++ STATIC )
|
||||||
|
|
||||||
|
def_vars()
|
||||||
|
|
||||||
list( APPEND SOURCES
|
list( APPEND SOURCES
|
||||||
PRIVATE
|
PRIVATE
|
||||||
|
|
||||||
@@ -48,7 +52,7 @@ list( APPEND SOURCES++
|
|||||||
|
|
||||||
list( APPEND INCLUDES
|
list( APPEND INCLUDES
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/private
|
${_PRVDIR}
|
||||||
${TARGET_ROOT}/src/libFLAC/include
|
${TARGET_ROOT}/src/libFLAC/include
|
||||||
PUBLIC
|
PUBLIC
|
||||||
${TARGET_ROOT}/include
|
${TARGET_ROOT}/include
|
||||||
@@ -62,8 +66,9 @@ list( APPEND DEFINES
|
|||||||
)
|
)
|
||||||
|
|
||||||
list( APPEND LIBRARIES
|
list( APPEND LIBRARIES
|
||||||
PRIVATE
|
PUBLIC
|
||||||
libogg
|
libogg
|
||||||
|
libflac++
|
||||||
)
|
)
|
||||||
|
|
||||||
list( APPEND LIBRARIES++
|
list( APPEND LIBRARIES++
|
||||||
@@ -72,7 +77,7 @@ list( APPEND LIBRARIES++
|
|||||||
)
|
)
|
||||||
|
|
||||||
set( CPU_IS_BIG_ENDIAN ${WORDS_BIGENDIAN} )
|
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 )
|
set( FLAC__HAS_OGG 1 )
|
||||||
|
|
||||||
@@ -83,16 +88,12 @@ configure_file( config.h.in private/config.h )
|
|||||||
organize_source( "${TARGET_ROOT}" "" "${SOURCES}" )
|
organize_source( "${TARGET_ROOT}" "" "${SOURCES}" )
|
||||||
target_sources( ${TARGET} PRIVATE ${SOURCES} )
|
target_sources( ${TARGET} PRIVATE ${SOURCES} )
|
||||||
target_compile_definitions( ${TARGET} PRIVATE ${DEFINES} )
|
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_include_directories( ${TARGET} PRIVATE ${INCLUDES} )
|
||||||
target_link_libraries( ${TARGET} PRIVATE ${LIBRARIES} )
|
target_link_libraries( ${TARGET} PRIVATE ${LIBRARIES} )
|
||||||
|
|
||||||
organize_source( "${TARGET_ROOT}" "" "${SOURCES++}" )
|
organize_source( "${TARGET_ROOT}" "" "${SOURCES++}" )
|
||||||
target_sources( ${TARGET}++ PRIVATE ${SOURCES++} )
|
target_sources( ${TARGET}++ PRIVATE ${SOURCES++} )
|
||||||
target_compile_definitions( ${TARGET}++ PRIVATE ${DEFINES} )
|
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_include_directories( ${TARGET}++ PRIVATE ${INCLUDES} )
|
||||||
target_link_libraries( ${TARGET}++ PRIVATE ${LIBRARIES++} )
|
target_link_libraries( ${TARGET}++ PRIVATE ${LIBRARIES++} )
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
|
|
||||||
add_library( ${TARGET} STATIC )
|
add_library( ${TARGET} STATIC )
|
||||||
|
|
||||||
|
def_vars()
|
||||||
|
|
||||||
list( APPEND SOURCES
|
list( APPEND SOURCES
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${TARGET_ROOT}/compat.c
|
${TARGET_ROOT}/compat.c
|
||||||
@@ -23,7 +25,7 @@ list( APPEND SOURCES
|
|||||||
|
|
||||||
list( APPEND INCLUDES
|
list( APPEND INCLUDES
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/private
|
${_PRVDIR}
|
||||||
$<$<PLATFORM_ID:Windows>:$ENV{WXWIN}/src/zlib>
|
$<$<PLATFORM_ID:Windows>:$ENV{WXWIN}/src/zlib>
|
||||||
PUBLIC
|
PUBLIC
|
||||||
${TARGET_ROOT}
|
${TARGET_ROOT}
|
||||||
@@ -31,18 +33,18 @@ list( APPEND INCLUDES
|
|||||||
|
|
||||||
list( APPEND OPTIONS
|
list( APPEND OPTIONS
|
||||||
PRIVATE
|
PRIVATE
|
||||||
$<$<C_COMPILER_ID:GNU>:-Wno-implicit-function-declaration>
|
$<$<C_COMPILER_ID:AppleClang,Clang,GNU>:-Wno-implicit-function-declaration>
|
||||||
)
|
)
|
||||||
|
|
||||||
list( APPEND LIBRARIES
|
list( APPEND LIBRARIES
|
||||||
PRIVATE
|
PRIVATE
|
||||||
wxwidgets
|
wxWidgets
|
||||||
)
|
)
|
||||||
|
|
||||||
configure_file( config.h.in private/config.h )
|
configure_file( config.h.in private/config.h )
|
||||||
|
|
||||||
organize_source( "${TARGET_ROOT}" "src" "${SOURCES}" )
|
organize_source( "${TARGET_ROOT}" "src" "${SOURCES}" )
|
||||||
target_sources( ${TARGET} PRIVATE ${SOURCES} )
|
target_sources( ${TARGET} PRIVATE ${SOURCES} )
|
||||||
target_compile_definitions( ${TARGET} PRIVATE ${DEFINES} )
|
|
||||||
target_compile_options( ${TARGET} PRIVATE ${OPTIONS} )
|
target_compile_options( ${TARGET} PRIVATE ${OPTIONS} )
|
||||||
target_include_directories( ${TARGET} PRIVATE ${INCLUDES} )
|
target_include_directories( ${TARGET} PRIVATE ${INCLUDES} )
|
||||||
target_link_libraries( ${TARGET} PRIVATE ${LIBRARIES} )
|
target_link_libraries( ${TARGET} PRIVATE ${LIBRARIES} )
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
|
|
||||||
add_library( ${TARGET} STATIC )
|
add_library( ${TARGET} STATIC )
|
||||||
|
|
||||||
|
def_vars()
|
||||||
|
|
||||||
list( APPEND SOURCES
|
list( APPEND SOURCES
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${TARGET_ROOT}/bit.c
|
${TARGET_ROOT}/bit.c
|
||||||
@@ -18,9 +20,9 @@ list( APPEND SOURCES
|
|||||||
|
|
||||||
list( APPEND INCLUDES
|
list( APPEND INCLUDES
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/private
|
${_PRVDIR}
|
||||||
PUBLIC
|
PUBLIC
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/public
|
${_PUBDIR}
|
||||||
${TARGET_ROOT}
|
${TARGET_ROOT}
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -34,13 +36,12 @@ list( APPEND DEFINES
|
|||||||
|
|
||||||
list( APPEND OPTIONS
|
list( APPEND OPTIONS
|
||||||
PRIVATE
|
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 )
|
set( FPM FPM_DEFAULT )
|
||||||
|
|
||||||
|
configure_file( config.h.in private/config.h )
|
||||||
configure_file( mad.h.in public/mad.h )
|
configure_file( mad.h.in public/mad.h )
|
||||||
|
|
||||||
organize_source( "${TARGET_ROOT}" "" "${SOURCES}" )
|
organize_source( "${TARGET_ROOT}" "" "${SOURCES}" )
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
|
|
||||||
add_library( ${TARGET} STATIC )
|
add_library( ${TARGET} STATIC )
|
||||||
|
|
||||||
|
def_vars()
|
||||||
|
|
||||||
list( APPEND SOURCES
|
list( APPEND SOURCES
|
||||||
PRIVATE
|
PRIVATE
|
||||||
# libnyquist
|
# libnyquist
|
||||||
@@ -270,11 +272,8 @@ list( APPEND INCLUDES
|
|||||||
${TARGET_ROOT}/nyquist/nyqstk/include
|
${TARGET_ROOT}/nyquist/nyqstk/include
|
||||||
${TARGET_ROOT}/nyquist/tran
|
${TARGET_ROOT}/nyquist/tran
|
||||||
${TARGET_ROOT}/nyquist/xlisp
|
${TARGET_ROOT}/nyquist/xlisp
|
||||||
|
$<$<BOOL:${UNIX}>:${TARGET_ROOT}/nyquist/sys/unix>
|
||||||
$<$<PLATFORM_ID:Darwin>:${TARGET_ROOT}/nyquist/sys/unix>
|
$<$<NOT:$<BOOL:${UNIX}>>:${TARGET_ROOT}/nyquist/sys/win/msvc>
|
||||||
$<$<PLATFORM_ID:Linux>:${TARGET_ROOT}/nyquist/sys/unix>
|
|
||||||
$<$<PLATFORM_ID:Windows>:${TARGET_ROOT}/nyquist/sys/win/msvc>
|
|
||||||
|
|
||||||
PUBLIC
|
PUBLIC
|
||||||
${TARGET_ROOT}
|
${TARGET_ROOT}
|
||||||
)
|
)
|
||||||
@@ -283,7 +282,7 @@ list( APPEND DEFINES
|
|||||||
PRIVATE
|
PRIVATE
|
||||||
CMTSTUFF
|
CMTSTUFF
|
||||||
EXT
|
EXT
|
||||||
$<$<PLATFORM_ID:Windows>:_LIB WIN32 D_LIB>
|
$<$<PLATFORM_ID:Windows>:WIN32>
|
||||||
)
|
)
|
||||||
|
|
||||||
list( APPEND OPTIONS
|
list( APPEND OPTIONS
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
|
|
||||||
add_library( ${TARGET} STATIC )
|
add_library( ${TARGET} STATIC )
|
||||||
|
|
||||||
|
def_vars()
|
||||||
|
|
||||||
list( APPEND SOURCES
|
list( APPEND SOURCES
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${TARGET_ROOT}/src/bitwise.c
|
${TARGET_ROOT}/src/bitwise.c
|
||||||
@@ -9,7 +11,7 @@ list( APPEND SOURCES
|
|||||||
|
|
||||||
list( APPEND INCLUDES
|
list( APPEND INCLUDES
|
||||||
PUBLIC
|
PUBLIC
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/public
|
${_PUBDIR}
|
||||||
${TARGET_ROOT}/include
|
${TARGET_ROOT}/include
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
|
|
||||||
add_library( ${TARGET} STATIC )
|
add_library( ${TARGET} STATIC )
|
||||||
|
|
||||||
|
def_vars()
|
||||||
|
|
||||||
list( APPEND SOURCES
|
list( APPEND SOURCES
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${TARGET_ROOT}/audioreader.cpp
|
${TARGET_ROOT}/audioreader.cpp
|
||||||
|
|||||||
@@ -100,13 +100,11 @@ list( APPEND OPTIONS
|
|||||||
$<$<C_COMPILER_ID:MSVC>:/wd4996>
|
$<$<C_COMPILER_ID:MSVC>:/wd4996>
|
||||||
)
|
)
|
||||||
|
|
||||||
if( CMAKE_SYSTEM_NAME MATCHES "Windows" )
|
if( CMAKE_C_COMPILER_ID MATCHES "MSVC" )
|
||||||
cmake_push_check_state(RESET)
|
cmake_push_check_state( RESET )
|
||||||
set( CMAKE_EXTRA_INCLUDE_FILES "BaseTsd.h" )
|
set( CMAKE_EXTRA_INCLUDE_FILES "BaseTsd.h" )
|
||||||
check_type_size( "SSIZE_T" SIZEOF_SSIZE LANGUAGE C )
|
check_type_size( "SSIZE_T" SIZEOF_SSIZE LANGUAGE C )
|
||||||
list( APPEND DEFINES
|
list( APPEND DEFINES ssize_t=SSIZE_T )
|
||||||
ssize_t=SSIZE_T
|
|
||||||
)
|
|
||||||
cmake_pop_check_state()
|
cmake_pop_check_state()
|
||||||
else()
|
else()
|
||||||
check_type_size( "ssize_t" SIZEOF_SSIZE LANGUAGE C )
|
check_type_size( "ssize_t" SIZEOF_SSIZE LANGUAGE C )
|
||||||
@@ -138,7 +136,7 @@ if( CMAKE_SYSTEM_NAME MATCHES "Windows" )
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
set( CPU_IS_BIG_ENDIAN ${WORDS_BIGENDIAN} )
|
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( HAVE_EXTERNAL_LIBS 0 )
|
||||||
|
|
||||||
set( VERSION "1.0.24" )
|
set( VERSION "1.0.24" )
|
||||||
@@ -149,7 +147,7 @@ set( PACKAGE_VERSION ${VERSION} )
|
|||||||
# Does compiler support "flexible array members"
|
# Does compiler support "flexible array members"
|
||||||
try_compile( HAVE_FLEXIBLE_ARRAY
|
try_compile( HAVE_FLEXIBLE_ARRAY
|
||||||
${CMAKE_CURRENT_BINARY_DIR}
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/famcheck.c
|
${_SRCDIR}/famcheck.c
|
||||||
LINK_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES}
|
LINK_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES}
|
||||||
OUTPUT_VARIABLE c_out
|
OUTPUT_VARIABLE c_out
|
||||||
)
|
)
|
||||||
@@ -157,7 +155,7 @@ try_compile( HAVE_FLEXIBLE_ARRAY
|
|||||||
# Determine how the CPU clips when doing float to int conversions
|
# Determine how the CPU clips when doing float to int conversions
|
||||||
try_run( r_rc c_rc
|
try_run( r_rc c_rc
|
||||||
${CMAKE_CURRENT_BINARY_DIR}
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/clipcheck.c
|
${_SRCDIR}/clipcheck.c
|
||||||
LINK_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES}
|
LINK_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES}
|
||||||
RUN_OUTPUT_VARIABLE r_out
|
RUN_OUTPUT_VARIABLE r_out
|
||||||
COMPILE_OUTPUT_VARIABLE c_out
|
COMPILE_OUTPUT_VARIABLE c_out
|
||||||
@@ -165,7 +163,7 @@ try_run( r_rc c_rc
|
|||||||
|
|
||||||
if( NOT c_rc )
|
if( NOT c_rc )
|
||||||
message( STATUS "${c_out}" )
|
message( STATUS "${c_out}" )
|
||||||
message( FATAL_ERROR "${CMAKE_CURRENT_SOURCE_DIR}/clipcheck.c compile failed:" )
|
message( FATAL_ERROR "${_SRCDIR}/clipcheck.c compile failed:" )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
list( GET r_out 0 CPU_CLIPS_POSITIVE )
|
list( GET r_out 0 CPU_CLIPS_POSITIVE )
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
|
|
||||||
add_library( ${TARGET} STATIC )
|
add_library( ${TARGET} STATIC )
|
||||||
|
|
||||||
|
def_vars()
|
||||||
|
|
||||||
set(CMAKE_MODULE_PATH ${TARGET_ROOT}/cmake/Modules )
|
set(CMAKE_MODULE_PATH ${TARGET_ROOT}/cmake/Modules )
|
||||||
|
|
||||||
list( APPEND SOURCES
|
list( APPEND SOURCES
|
||||||
@@ -26,7 +28,7 @@ list( APPEND SOURCES
|
|||||||
|
|
||||||
list( APPEND INCLUDES
|
list( APPEND INCLUDES
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/private
|
${_PRVDIR}
|
||||||
PUBLIC
|
PUBLIC
|
||||||
${TARGET_ROOT}/src
|
${TARGET_ROOT}/src
|
||||||
)
|
)
|
||||||
@@ -40,19 +42,20 @@ list( APPEND DEFINES
|
|||||||
|
|
||||||
list( APPEND OPTIONS
|
list( APPEND OPTIONS
|
||||||
PRIVATE
|
PRIVATE
|
||||||
$<$<IN_LIST:${CMAKE_C_COMPILER_ID},GNU;Clang;AppleClang>:-Wall>
|
$<$<C_COMPILER_ID:AppleClang,Clang,GNU>:
|
||||||
)
|
-Wconversion
|
||||||
|
-Wall
|
||||||
if( CMAKE_C_COMPILER_ID MATCHES "GNU|.*Clang" )
|
-Wextra
|
||||||
list( APPEND OPTIONS
|
-pedantic
|
||||||
PRIVATE
|
-Wundef
|
||||||
-Wconversion -Wall -Wextra -pedantic -Wundef -Wpointer-arith -Wno-long-long
|
-Wpointer-arith
|
||||||
$<$<C_COMPILER_ID:Clang>:-Wno-keyword-macro>
|
-Wno-long-long
|
||||||
$<$<COMPILE_LANGUAGE:CXX>:
|
-Wnested-externs
|
||||||
-std=gnu89 -Wnested-externs -Wmissing-prototypes -Wstrict-prototypes
|
-Wmissing-prototypes
|
||||||
|
-Wstrict-prototypes
|
||||||
>
|
>
|
||||||
)
|
$<$<C_COMPILER_ID:AppleClang,Clang>:-Wno-keyword-macro>
|
||||||
endif()
|
)
|
||||||
|
|
||||||
set( HAVE_BIGENDIAN ${WORDS_BIGENDIAN} )
|
set( HAVE_BIGENDIAN ${WORDS_BIGENDIAN} )
|
||||||
|
|
||||||
@@ -61,21 +64,22 @@ set( AVUTIL_FOUND NO )
|
|||||||
set( WITH_PFFFT YES )
|
set( WITH_PFFFT YES )
|
||||||
|
|
||||||
set( WITH_CR32 YES )
|
set( WITH_CR32 YES )
|
||||||
set( WITH_CR32S YES )
|
set( WITH_CR32S NO )
|
||||||
set( WITH_CR64 YES )
|
set( WITH_CR64 YES )
|
||||||
set( WITH_CR64S YES )
|
set( WITH_CR64S NO )
|
||||||
set( WITH_VR32 YES )
|
set( WITH_VR32 YES )
|
||||||
|
|
||||||
# Copied from libsoxr CMakeLists.txt
|
find_package( SIMD32 )
|
||||||
if( WITH_CR32S )
|
if( SIMD32_FOUND )
|
||||||
find_package( SIMD32 )
|
set( WITH_CR32S ON )
|
||||||
set( WITH_CR32S ${SIMD32_FOUND} )
|
string( STRIP "${SIMD32_C_FLAGS}" SIMD32_C_FLAGS )
|
||||||
# list( APPEND OPTIONS ${SIMD32_C_FLAGS} )
|
list( APPEND OPTIONS ${SIMD32_C_FLAGS} )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if( WITH_CR64S )
|
find_package( SIMD64 )
|
||||||
find_package( SIMD64 )
|
if( SIMD64_FOUND )
|
||||||
set( WITH_CR64S ${SIMD64_FOUND} )
|
set( WITH_CR64S ON )
|
||||||
|
string( STRIP "${SIMD64_C_FLAGS}" SIMD64_C_FLAGS )
|
||||||
list( APPEND OPTIONS ${SIMD64_C_FLAGS} )
|
list( APPEND OPTIONS ${SIMD64_C_FLAGS} )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,8 @@
|
|||||||
add_library( ${TARGET} STATIC )
|
add_library( ${TARGET} STATIC )
|
||||||
add_library( ${TARGET}-hostsdk ALIAS ${TARGET} )
|
add_library( ${TARGET}-hostsdk ALIAS ${TARGET} )
|
||||||
|
|
||||||
|
def_vars()
|
||||||
|
|
||||||
list( APPEND SOURCES
|
list( APPEND SOURCES
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${TARGET_ROOT}/src/vamp-hostsdk/PluginBufferingAdapter.cpp
|
${TARGET_ROOT}/src/vamp-hostsdk/PluginBufferingAdapter.cpp
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ add_library( ${TARGET} STATIC )
|
|||||||
add_library( ${TARGET}enc ALIAS ${TARGET} )
|
add_library( ${TARGET}enc ALIAS ${TARGET} )
|
||||||
add_library( ${TARGET}file ALIAS ${TARGET} )
|
add_library( ${TARGET}file ALIAS ${TARGET} )
|
||||||
|
|
||||||
|
def_vars()
|
||||||
|
|
||||||
list( APPEND SOURCES
|
list( APPEND SOURCES
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${TARGET_ROOT}/lib/analysis.c
|
${TARGET_ROOT}/lib/analysis.c
|
||||||
@@ -31,9 +33,8 @@ list( APPEND SOURCES
|
|||||||
|
|
||||||
list( APPEND INCLUDES
|
list( APPEND INCLUDES
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/private
|
${_PRVDIR}
|
||||||
${TARGET_ROOT}/lib
|
${TARGET_ROOT}/lib
|
||||||
${LIBOGG_INCLUDES}
|
|
||||||
PUBLIC
|
PUBLIC
|
||||||
${TARGET_ROOT}/include
|
${TARGET_ROOT}/include
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -166,13 +166,13 @@ macro( bld name packages define sources )
|
|||||||
break()
|
break()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
list( APPEND libs PRIVATE
|
list( APPEND libs
|
||||||
|
PRIVATE
|
||||||
"PkgConfig::${pkg}"
|
"PkgConfig::${pkg}"
|
||||||
)
|
)
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
if( NOT missing )
|
if( NOT missing )
|
||||||
|
|
||||||
list( APPEND DEFINES
|
list( APPEND DEFINES
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${define}
|
${define}
|
||||||
@@ -199,8 +199,8 @@ if( WIN32 )
|
|||||||
set( LILV_DIR_SEP "\\\\" )
|
set( LILV_DIR_SEP "\\\\" )
|
||||||
set( LILV_DEFAULT_LV2_PATH "%APPDATA%\\LV2;%COMMONPROGRAMFILES%\\LV2" )
|
set( LILV_DEFAULT_LV2_PATH "%APPDATA%\\LV2;%COMMONPROGRAMFILES%\\LV2" )
|
||||||
|
|
||||||
set( SUIL_MODULE_DIR "C:\\Windows\\System32" )
|
set( SUIL_MODULE_DIR "" )
|
||||||
set( SUIL_DIR_SEP "\\\\" )
|
set( SUIL_DIR_SEP "" )
|
||||||
set( SUIL_GTK2_LIB_NAME "libgtk-x11-2.0.so.0" )
|
set( SUIL_GTK2_LIB_NAME "libgtk-x11-2.0.so.0" )
|
||||||
set( SUIL_GTK3_LIB_NAME "libgtk-x11-3.0.so.0" )
|
set( SUIL_GTK3_LIB_NAME "libgtk-x11-3.0.so.0" )
|
||||||
set( SUIL_MODULE_PREFIX "" )
|
set( SUIL_MODULE_PREFIX "" )
|
||||||
@@ -210,8 +210,8 @@ elseif( APPLE )
|
|||||||
set( LILV_DIR_SEP "/" )
|
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( 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_MODULE_DIR "" )
|
||||||
set( SUIL_DIR_SEP "/" )
|
set( SUIL_DIR_SEP "" )
|
||||||
set( SUIL_GTK2_LIB_NAME "libgtk-x11-2.0.so.0" )
|
set( SUIL_GTK2_LIB_NAME "libgtk-x11-2.0.so.0" )
|
||||||
set( SUIL_GTK3_LIB_NAME "libgtk-x11-3.0.so.0" )
|
set( SUIL_GTK3_LIB_NAME "libgtk-x11-3.0.so.0" )
|
||||||
set( SUIL_MODULE_PREFIX "lib" )
|
set( SUIL_MODULE_PREFIX "lib" )
|
||||||
@@ -221,8 +221,8 @@ elseif( UNIX )
|
|||||||
set( LILV_DIR_SEP "/" )
|
set( LILV_DIR_SEP "/" )
|
||||||
set( LILV_DEFAULT_LV2_PATH "~/.lv2:/usr/lib/lv2:/usr/local/lib/lv2" )
|
set( LILV_DEFAULT_LV2_PATH "~/.lv2:/usr/lib/lv2:/usr/local/lib/lv2" )
|
||||||
|
|
||||||
set( SUIL_MODULE_DIR "/usr/local/lib/suil-0" )
|
set( SUIL_MODULE_DIR "" )
|
||||||
set( SUIL_DIR_SEP "/" )
|
set( SUIL_DIR_SEP "" )
|
||||||
set( SUIL_GTK2_LIB_NAME "libgtk-x11-2.0.so.0" )
|
set( SUIL_GTK2_LIB_NAME "libgtk-x11-2.0.so.0" )
|
||||||
set( SUIL_GTK3_LIB_NAME "libgtk-x11-3.0.so.0" )
|
set( SUIL_GTK3_LIB_NAME "libgtk-x11-3.0.so.0" )
|
||||||
set( SUIL_MODULE_PREFIX "lib" )
|
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" )
|
configure_file( suil_config.h.in "${_PRVDIR}/suil_config.h" )
|
||||||
|
|
||||||
organize_source( "${TARGET_ROOT}" "" "${SOURCES} ${HEADERS}" )
|
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_compile_definitions( ${TARGET} PRIVATE ${DEFINES} )
|
||||||
target_include_directories( ${TARGET} PRIVATE ${INCLUDES} )
|
target_include_directories( ${TARGET} PRIVATE ${INCLUDES} )
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ list( APPEND LIBRARIES
|
|||||||
Audacity
|
Audacity
|
||||||
libnyquist
|
libnyquist
|
||||||
portaudio-v19
|
portaudio-v19
|
||||||
wxwidgets
|
wxWidgets
|
||||||
)
|
)
|
||||||
|
|
||||||
set_target_property_all( ${TARGET} LIBRARY_OUTPUT_DIRECTORY "${_DEST}/modules" )
|
set_target_property_all( ${TARGET} LIBRARY_OUTPUT_DIRECTORY "${_DEST}/modules" )
|
||||||
|
|||||||
@@ -26,8 +26,8 @@ list( APPEND DEFINES
|
|||||||
|
|
||||||
list( APPEND LIBRARIES
|
list( APPEND LIBRARIES
|
||||||
PRIVATE
|
PRIVATE
|
||||||
wxwidgets
|
|
||||||
Audacity
|
Audacity
|
||||||
|
wxWidgets
|
||||||
)
|
)
|
||||||
|
|
||||||
set_target_property_all( ${TARGET} LIBRARY_OUTPUT_DIRECTORY "${_DEST}/modules" )
|
set_target_property_all( ${TARGET} LIBRARY_OUTPUT_DIRECTORY "${_DEST}/modules" )
|
||||||
|
|||||||
@@ -1,6 +1,62 @@
|
|||||||
|
|
||||||
add_library( ${TARGET} STATIC )
|
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
|
list( APPEND SOURCES
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${TARGET_ROOT}/src/common/pa_allocation.c
|
${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_ringbuffer.c
|
||||||
${TARGET_ROOT}/src/common/pa_stream.c
|
${TARGET_ROOT}/src/common/pa_stream.c
|
||||||
${TARGET_ROOT}/src/common/pa_trace.c
|
${TARGET_ROOT}/src/common/pa_trace.c
|
||||||
)
|
|
||||||
|
|
||||||
list( APPEND INCLUDES
|
$<$<PLATFORM_ID:Windows>:
|
||||||
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
|
|
||||||
${TARGET_ROOT}/src/os/win/pa_win_coinitialize.c
|
${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_hostapis.c
|
||||||
${TARGET_ROOT}/src/os/win/pa_win_util.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_waveformat.c
|
||||||
${TARGET_ROOT}/src/os/win/pa_win_wdmks_utils.c
|
${TARGET_ROOT}/src/os/win/pa_win_wdmks_utils.c
|
||||||
${TARGET_ROOT}/src/os/win/pa_x86_plain_converters.c
|
${TARGET_ROOT}/src/os/win/pa_x86_plain_converters.c
|
||||||
)
|
>
|
||||||
|
|
||||||
list( APPEND INCLUDES
|
$<$<PLATFORM_ID:Darwin>:
|
||||||
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
|
|
||||||
${TARGET_ROOT}/src/hostapi/coreaudio/pa_mac_core.c
|
${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_blocking.c
|
||||||
${TARGET_ROOT}/src/hostapi/coreaudio/pa_mac_core_utilities.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_hostapis.c
|
||||||
${TARGET_ROOT}/src/os/unix/pa_unix_util.c
|
${TARGET_ROOT}/src/os/unix/pa_unix_util.c
|
||||||
)
|
>
|
||||||
|
|
||||||
list( APPEND INCLUDES
|
$<$<BOOL:${use_pa_ds}>:
|
||||||
PRIVATE
|
${TARGET_ROOT}/src/hostapi/dsound/pa_win_ds.c
|
||||||
${TARGET_ROOT}/src/hostapi/coreaudio
|
${TARGET_ROOT}/src/hostapi/dsound/pa_win_ds_dynlink.c
|
||||||
${TARGET_ROOT}/src/os/unix
|
>
|
||||||
)
|
|
||||||
|
|
||||||
list( APPEND LIBRARIES
|
$<$<BOOL:${use_pa_wasapi}>:
|
||||||
INTERFACE
|
${TARGET_ROOT}/src/hostapi/wasapi/pa_win_wasapi.c
|
||||||
"-framework CoreAudio"
|
>
|
||||||
)
|
|
||||||
elseif( UNIX )
|
|
||||||
find_package(ALSA)
|
|
||||||
if( ALSA_FOUND )
|
|
||||||
list( APPEND DEFINES
|
|
||||||
PUBLIC
|
|
||||||
PA_USE_ALSA=1
|
|
||||||
)
|
|
||||||
|
|
||||||
list( APPEND SOURCES
|
$<$<BOOL:${use_pa_wmme}>:
|
||||||
PRIVATE
|
${TARGET_ROOT}/src/hostapi/wmme/pa_win_wmme.c
|
||||||
|
>
|
||||||
|
|
||||||
|
$<$<BOOL:${use_pa_alsa}>:
|
||||||
${TARGET_ROOT}/src/hostapi/alsa/pa_linux_alsa.c
|
${TARGET_ROOT}/src/hostapi/alsa/pa_linux_alsa.c
|
||||||
)
|
>
|
||||||
|
|
||||||
list( APPEND INCLUDES
|
$<$<BOOL:${use_pa_oss}>:
|
||||||
PRIVATE
|
${TARGET_ROOT}/src/hostapi/oss/pa_unix_oss.c
|
||||||
${ALSA_INCLUDE_DIRS}
|
>
|
||||||
)
|
|
||||||
|
|
||||||
list( APPEND LIBRARIES
|
$<$<BOOL:${use_pa_jack}>:
|
||||||
INTERFACE
|
|
||||||
${ALSA_LIBRARIES}
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
list( APPEND SOURCES
|
|
||||||
PRIVATE
|
|
||||||
${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/os/unix
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set( CMAKE_MODULE_PATH ${TARGET_ROOT}/cmake_support )
|
|
||||||
|
|
||||||
find_package(Jack)
|
|
||||||
if( JACK_FOUND )
|
|
||||||
list( APPEND DEFINES
|
|
||||||
PUBLIC
|
|
||||||
PA_USE_JACK=1
|
|
||||||
)
|
|
||||||
|
|
||||||
list( APPEND SOURCES
|
|
||||||
PRIVATE
|
|
||||||
${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
|
||||||
)
|
>
|
||||||
|
)
|
||||||
|
|
||||||
list( APPEND INCLUDES
|
list( APPEND INCLUDES
|
||||||
PRIVATE
|
PRIVATE
|
||||||
|
${TARGET_ROOT}/src/common
|
||||||
|
|
||||||
|
$<$<PLATFORM_ID:Windows>:
|
||||||
|
${TARGET_ROOT}/src/os/win
|
||||||
|
>
|
||||||
|
|
||||||
|
$<$<PLATFORM_ID:Darwin,Linux,FreeBSD>:
|
||||||
|
${TARGET_ROOT}/src/os/unix
|
||||||
|
>
|
||||||
|
|
||||||
|
$<$<BOOL:${use_pa_ds}>:
|
||||||
|
${TARGET_ROOT}/src/hostapi/dsound
|
||||||
|
>
|
||||||
|
|
||||||
|
$<$<BOOL:${use_pa_coreaudio}>:
|
||||||
|
${TARGET_ROOT}/src/hostapi/coreaudio
|
||||||
|
>
|
||||||
|
|
||||||
|
$<$<BOOL:${use_pa_alsa}>:
|
||||||
|
${ALSA_INCLUDE_DIRS}
|
||||||
|
>
|
||||||
|
|
||||||
|
$<$<BOOL:${use_pa_oss}>:
|
||||||
|
${OSS_INCLUDE_DIRS}
|
||||||
|
>
|
||||||
|
|
||||||
|
$<$<BOOL:${use_pa_jack}>:
|
||||||
${TARGET_ROOT}/src/hostapi/jack
|
${TARGET_ROOT}/src/hostapi/jack
|
||||||
${JACK_INCLUDE_DIRS}
|
${JACK_INCLUDE_DIRS}
|
||||||
)
|
>
|
||||||
|
|
||||||
list( APPEND LIBRARIES
|
PUBLIC
|
||||||
|
${TARGET_ROOT}/include
|
||||||
|
)
|
||||||
|
|
||||||
|
list( APPEND DEFINES
|
||||||
|
PUBLIC
|
||||||
|
$<$<BOOL:${use_pa_ds}>:
|
||||||
|
PA_USE_DS=1
|
||||||
|
>
|
||||||
|
|
||||||
|
$<$<BOOL:${use_pa_wasapi}>:
|
||||||
|
PA_USE_WASAPI=1
|
||||||
|
>
|
||||||
|
|
||||||
|
$<$<BOOL:${use_pa_wmme}>:
|
||||||
|
PA_USE_WMME=1
|
||||||
|
>
|
||||||
|
|
||||||
|
$<$<BOOL:${use_pa_coreaudio}>:
|
||||||
|
PA_USE_COREAUDIO=1
|
||||||
|
>
|
||||||
|
|
||||||
|
$<$<BOOL:${use_pa_alsa}>:
|
||||||
|
PA_USE_ALSA=1
|
||||||
|
>
|
||||||
|
|
||||||
|
$<$<BOOL:${use_pa_oss}>:
|
||||||
|
PA_USE_OSS=1
|
||||||
|
HAVE_SYS_SOUNDCARD_H=1
|
||||||
|
>
|
||||||
|
|
||||||
|
$<$<BOOL:${use_pa_jack}>:
|
||||||
|
PA_USE_JACK=1
|
||||||
|
>
|
||||||
|
|
||||||
|
$<$<NOT:$<BOOL:${disable_dynamic_jack}>>:
|
||||||
|
PA_DYNAMIC_JACK=1
|
||||||
|
>
|
||||||
|
)
|
||||||
|
|
||||||
|
list( APPEND LIBRARIES
|
||||||
INTERFACE
|
INTERFACE
|
||||||
|
$<$<BOOL:${use_pa_alsa}>:
|
||||||
|
${ALSA_LIBRARIES}
|
||||||
|
>
|
||||||
|
|
||||||
|
$<$<BOOL:${use_pa_oss}>:
|
||||||
|
${OSS_LIBRARIES}
|
||||||
|
>
|
||||||
|
|
||||||
|
$<$<BOOL:${use_pa_jack}>:
|
||||||
${JACK_LIBRARIES}
|
${JACK_LIBRARIES}
|
||||||
)
|
>
|
||||||
endif()
|
)
|
||||||
|
|
||||||
organize_source( "${TARGET_ROOT}" "" "${SOURCES}" )
|
organize_source( "${TARGET_ROOT}" "" "${SOURCES}" )
|
||||||
target_sources( ${TARGET} PRIVATE ${SOURCES} )
|
target_sources( ${TARGET} PRIVATE ${SOURCES} )
|
||||||
|
|||||||
@@ -1,51 +1,87 @@
|
|||||||
|
|
||||||
add_library( ${TARGET} STATIC )
|
add_library( ${TARGET} STATIC )
|
||||||
|
|
||||||
|
def_vars()
|
||||||
|
|
||||||
list( APPEND SOURCES
|
list( APPEND SOURCES
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${TARGET_ROOT}/pm_common/portmidi.c
|
${TARGET_ROOT}/pm_common/portmidi.c
|
||||||
${TARGET_ROOT}/pm_common/pmutil.c
|
${TARGET_ROOT}/pm_common/pmutil.c
|
||||||
${TARGET_ROOT}/porttime/porttime.c
|
${TARGET_ROOT}/porttime/porttime.c
|
||||||
$<$<PLATFORM_ID:Windows>:${TARGET_ROOT}/pm_win/pmwin.c>
|
|
||||||
$<$<PLATFORM_ID:Windows>:${TARGET_ROOT}/pm_win/pmwinmm.c>
|
$<$<PLATFORM_ID:Windows>:
|
||||||
$<$<PLATFORM_ID:Windows>:${TARGET_ROOT}/porttime/ptwinmm.c>
|
${TARGET_ROOT}/pm_win/pmwin.c
|
||||||
$<$<PLATFORM_ID:Darwin>:${TARGET_ROOT}/pm_mac/finddefault.c>
|
${TARGET_ROOT}/pm_win/pmwinmm.c
|
||||||
$<$<PLATFORM_ID:Darwin>:${TARGET_ROOT}/pm_mac/pmmac.c>
|
${TARGET_ROOT}/porttime/ptwinmm.c
|
||||||
$<$<PLATFORM_ID:Darwin>:${TARGET_ROOT}/pm_mac/pmmacosxcm.c>
|
>
|
||||||
$<$<PLATFORM_ID:Darwin>:${TARGET_ROOT}/pm_mac/readbinaryplist.c>
|
|
||||||
$<$<PLATFORM_ID:Darwin>:${TARGET_ROOT}/porttime/ptmacosx_mach.c>
|
$<$<PLATFORM_ID:Darwin>:
|
||||||
$<$<PLATFORM_ID:Linux>:${TARGET_ROOT}/pm_linux/finddefault.c>
|
${TARGET_ROOT}/pm_mac/finddefault.c
|
||||||
$<$<PLATFORM_ID:Linux>:${TARGET_ROOT}/pm_linux/pmlinux.c>
|
${TARGET_ROOT}/pm_mac/pmmac.c
|
||||||
$<$<PLATFORM_ID:Linux>:${TARGET_ROOT}/pm_linux/pmlinuxalsa.c>
|
${TARGET_ROOT}/pm_mac/pmmacosxcm.c
|
||||||
$<$<PLATFORM_ID:Linux>:${TARGET_ROOT}/porttime/ptlinux.c>
|
${TARGET_ROOT}/pm_mac/readbinaryplist.c
|
||||||
|
${TARGET_ROOT}/porttime/ptmacosx_mach.c
|
||||||
|
>
|
||||||
|
|
||||||
|
$<$<PLATFORM_ID:Linux,FreeBSD>:
|
||||||
|
${TARGET_ROOT}/pm_linux/finddefault.c
|
||||||
|
${TARGET_ROOT}/pm_linux/pmlinux.c
|
||||||
|
${TARGET_ROOT}/porttime/ptlinux.c
|
||||||
|
>
|
||||||
|
|
||||||
|
$<$<BOOL:${ALSA_FOUND}>:
|
||||||
|
${TARGET_ROOT}/pm_linux/pmlinuxalsa.c
|
||||||
|
>
|
||||||
)
|
)
|
||||||
|
|
||||||
list( APPEND INCLUDES
|
list( APPEND INCLUDES
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${TARGET_ROOT}/pm_common
|
${TARGET_ROOT}/pm_common
|
||||||
${TARGET_ROOT}/porttime
|
${TARGET_ROOT}/porttime
|
||||||
$<$<PLATFORM_ID:Windows>:${TARGET_ROOT}/pm_win>
|
|
||||||
$<$<PLATFORM_ID:Linux>:${TARGET_ROOT}/pm_linux>
|
$<$<PLATFORM_ID:Windows>:
|
||||||
$<$<PLATFORM_ID:Darwin>:${TARGET_ROOT}/pm_win>
|
${TARGET_ROOT}/pm_win
|
||||||
|
>
|
||||||
|
|
||||||
|
$<$<PLATFORM_ID:Darwin>:
|
||||||
|
${TARGET_ROOT}/pm_mac
|
||||||
|
>
|
||||||
|
|
||||||
|
$<$<PLATFORM_ID:Linux,FreeBSD>:
|
||||||
|
${TARGET_ROOT}/pm_linux
|
||||||
|
>
|
||||||
)
|
)
|
||||||
|
|
||||||
list( APPEND DEFINES
|
list( APPEND DEFINES
|
||||||
PRIVATE
|
PRIVATE
|
||||||
$<$<PLATFORM_ID:Linux>:PMALSA=1>
|
$<$<BOOL:${ALSA_FOUND}>:
|
||||||
|
PMALSA=1
|
||||||
|
>
|
||||||
)
|
)
|
||||||
|
|
||||||
list( APPEND OPTIONS
|
list( APPEND OPTIONS
|
||||||
PRIVATE
|
PRIVATE
|
||||||
$<$<PLATFORM_ID:Linux>:
|
$<$<C_COMPILER_ID:AppleClang,Clang,GNU>:
|
||||||
-Wno-pointer-to-int-cast
|
-Wno-pointer-to-int-cast
|
||||||
-Wno-int-to-pointer-cast
|
-Wno-int-to-pointer-cast
|
||||||
-Wno-implicit-function-declaration
|
-Wno-implicit-function-declaration
|
||||||
>
|
>
|
||||||
)
|
)
|
||||||
|
|
||||||
|
list( APPEND LIBRARIES
|
||||||
|
PUBLIC
|
||||||
|
$<$<PLATFORM_ID:Darwin>:
|
||||||
|
"-framework CoreMIDI"
|
||||||
|
>
|
||||||
|
$<$<PLATFORM_ID:FreeBSD>:
|
||||||
|
compat
|
||||||
|
>
|
||||||
|
)
|
||||||
|
|
||||||
organize_source( "${TARGET_ROOT}" "" "${SOURCES}" )
|
organize_source( "${TARGET_ROOT}" "" "${SOURCES}" )
|
||||||
target_sources( ${TARGET} PRIVATE ${SOURCES} )
|
target_sources( ${TARGET} PRIVATE ${SOURCES} )
|
||||||
target_compile_definitions( ${TARGET} PRIVATE ${DEFINES} )
|
target_compile_definitions( ${TARGET} PRIVATE ${DEFINES} )
|
||||||
target_compile_options( ${TARGET} PRIVATE ${OPTIONS} )
|
target_compile_options( ${TARGET} PRIVATE ${OPTIONS} )
|
||||||
target_include_directories( ${TARGET} PRIVATE ${INCLUDES} )
|
target_include_directories( ${TARGET} PRIVATE ${INCLUDES} )
|
||||||
|
target_link_libraries( ${TARGET} INTERFACE ${LIBRARIES} )
|
||||||
|
|
||||||
|
|||||||
@@ -1,19 +1,39 @@
|
|||||||
|
|
||||||
add_library( ${TARGET} STATIC )
|
add_library( ${TARGET} STATIC )
|
||||||
|
|
||||||
get_target_property( PA_DEFS portaudio-v19 COMPILE_DEFINITIONS )
|
def_vars()
|
||||||
string( REPLACE ";" " " PA_DEFS "${PA_DEFS}" )
|
|
||||||
|
|
||||||
list( APPEND SOURCES
|
list( APPEND SOURCES
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${TARGET_ROOT}/src/px_mixer.c
|
${TARGET_ROOT}/src/px_mixer.c
|
||||||
$<$<PLATFORM_ID:Windows>:${TARGET_ROOT}/src/px_win_common.c>
|
$<$<PLATFORM_ID:Windows>:
|
||||||
$<$<IN_LIST:PA_USE_DS=1,${PA_DEFS}>:${TARGET_ROOT}/src/px_win_ds.c>
|
${TARGET_ROOT}/src/px_win_common.c
|
||||||
$<$<IN_LIST:PA_USE_WASAPI=1,${PA_DEFS}>:${TARGET_ROOT}/src/px_win_wasapi.c>
|
>
|
||||||
$<$<IN_LIST:PA_USE_WMME=1,${PA_DEFS}>:${TARGET_ROOT}/src/px_win_wmme.c>
|
|
||||||
$<$<IN_LIST:PA_USE_COREAUDIO=1,${PA_DEFS}>:${TARGET_ROOT}/src/px_mac_coreaudio.c>
|
$<$<BOOL:${use_pa_ds}>:
|
||||||
$<$<IN_LIST:PA_USE_ALSA=1,${PA_DEFS}>:${TARGET_ROOT}/src/px_linux_alsa.c>
|
${TARGET_ROOT}/src/px_win_ds.c
|
||||||
$<$<IN_LIST:PA_USE_OSS=1,${PA_DEFS}>:${TARGET_ROOT}/src/px_unix_oss.c>
|
>
|
||||||
|
|
||||||
|
$<$<BOOL:${use_pa_wasapi}>:
|
||||||
|
${TARGET_ROOT}/src/px_win_wasapi.c
|
||||||
|
${TARGET_ROOT}/src/px_win_endpoint.c
|
||||||
|
>
|
||||||
|
|
||||||
|
$<$<BOOL:${use_pa_wmme}>:
|
||||||
|
${TARGET_ROOT}/src/px_win_wmme.c
|
||||||
|
>
|
||||||
|
|
||||||
|
$<$<BOOL:${use_pa_coreaudio}>:
|
||||||
|
${TARGET_ROOT}/src/px_mac_coreaudio.c
|
||||||
|
>
|
||||||
|
|
||||||
|
$<$<BOOL:${use_pa_alsa}>:
|
||||||
|
${TARGET_ROOT}/src/px_linux_alsa.c
|
||||||
|
>
|
||||||
|
|
||||||
|
$<$<BOOL:${use_pa_oss}>:
|
||||||
|
${TARGET_ROOT}/src/px_unix_oss.c
|
||||||
|
>
|
||||||
)
|
)
|
||||||
|
|
||||||
list( APPEND INCLUDES
|
list( APPEND INCLUDES
|
||||||
@@ -25,12 +45,29 @@ list( APPEND INCLUDES
|
|||||||
|
|
||||||
list( APPEND DEFINES
|
list( APPEND DEFINES
|
||||||
PRIVATE
|
PRIVATE
|
||||||
$<$<IN_LIST:PA_USE_DS=1,${PA_DEFS}>:PX_USE_WIN_DSOUND=1>
|
$<$<BOOL:${use_pa_ds}>:
|
||||||
$<$<IN_LIST:PA_USE_WASAPI=1,${PA_DEFS}>:PX_USE_WIN_WASAPI=1>
|
PX_USE_WIN_DSOUND=1
|
||||||
$<$<IN_LIST:PA_USE_WMME=1,${PA_DEFS}>:PX_USE_WIN_MME=1>
|
>
|
||||||
$<$<IN_LIST:PA_USE_COREAUDIO=1,${PA_DEFS}>:PX_USE_MAC_COREAUDIO=1>
|
|
||||||
$<$<IN_LIST:PA_USE_ALSA=1,${PA_DEFS}>:PX_USE_LINUX_ALSA=1>
|
$<$<BOOL:${use_pa_wasapi}>:
|
||||||
$<$<IN_LIST:PA_USE_OSS=1,${PA_DEFS}>:PX_USE_UNIX_OSS=1>
|
PX_USE_WIN_WASAPI=1
|
||||||
|
>
|
||||||
|
|
||||||
|
$<$<BOOL:${use_pa_wmme}>:
|
||||||
|
PX_USE_WIN_MME=1
|
||||||
|
>
|
||||||
|
|
||||||
|
$<$<BOOL:${use_pa_coreaudio}>:
|
||||||
|
PX_USE_MAC_COREAUDIO=1
|
||||||
|
>
|
||||||
|
|
||||||
|
$<$<BOOL:${use_pa_alsa}>:
|
||||||
|
PX_USE_LINUX_ALSA=1
|
||||||
|
>
|
||||||
|
|
||||||
|
$<$<BOOL:${use_pa_oss}>:
|
||||||
|
PX_USE_UNIX_OSS=1
|
||||||
|
>
|
||||||
)
|
)
|
||||||
|
|
||||||
list( APPEND LIBRARIES
|
list( APPEND LIBRARIES
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
|
|
||||||
add_library( ${TARGET} STATIC )
|
add_library( ${TARGET} STATIC )
|
||||||
|
|
||||||
|
def_vars()
|
||||||
|
|
||||||
list( APPEND SOURCES
|
list( APPEND SOURCES
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${TARGET_ROOT}/allegro.cpp
|
${TARGET_ROOT}/allegro.cpp
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
|
|
||||||
add_library( ${TARGET} STATIC )
|
add_library( ${TARGET} STATIC )
|
||||||
|
|
||||||
|
def_vars()
|
||||||
|
|
||||||
list( APPEND SOURCES
|
list( APPEND SOURCES
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${TARGET_ROOT}/src/buffer.cpp
|
${TARGET_ROOT}/src/buffer.cpp
|
||||||
@@ -18,15 +20,14 @@ list( APPEND SOURCES
|
|||||||
|
|
||||||
list( APPEND INCLUDES
|
list( APPEND INCLUDES
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/private
|
${_PRVDIR}
|
||||||
PUBLIC
|
PUBLIC
|
||||||
${TARGET_ROOT}/include
|
${TARGET_ROOT}/include
|
||||||
)
|
)
|
||||||
|
|
||||||
list( APPEND OPTIONS
|
list( APPEND OPTIONS
|
||||||
PRIVATE
|
PRIVATE
|
||||||
$<$<C_COMPILER_ID:CLANG>:-Wno-enum-compare>
|
$<$<C_COMPILER_ID:AppleClang,Clang,GNU>:-Wno-enum-compare>
|
||||||
$<$<C_COMPILER_ID:GNU>:-Wno-enum-compare>
|
|
||||||
)
|
)
|
||||||
|
|
||||||
find_package( Threads )
|
find_package( Threads )
|
||||||
@@ -34,14 +35,7 @@ if( Threads_FOUND AND CMAKE_USE_PTHREADS_INIT )
|
|||||||
set( MULTITHREADED 1 )
|
set( MULTITHREADED 1 )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if( UNIX )
|
set( ENABLE_SSE ${HAVE_SSE} )
|
||||||
check_cxx_compiler_flag( "-msse" ENABLE_SSE )
|
|
||||||
if( ENABLE_SSE )
|
|
||||||
list( APPEND OPTIONS
|
|
||||||
PRIVATE -msse
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
configure_file( config.h.in private/config.h )
|
configure_file( config.h.in private/config.h )
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
|
|
||||||
add_library( ${TARGET} STATIC )
|
add_library( ${TARGET} STATIC )
|
||||||
|
|
||||||
|
def_vars()
|
||||||
|
|
||||||
list( APPEND SOURCES
|
list( APPEND SOURCES
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${TARGET_ROOT}/source/SoundTouch/AAFilter.cpp
|
${TARGET_ROOT}/source/SoundTouch/AAFilter.cpp
|
||||||
@@ -16,28 +18,15 @@ list( APPEND SOURCES
|
|||||||
|
|
||||||
list( APPEND INCLUDES
|
list( APPEND INCLUDES
|
||||||
PUBLIC
|
PUBLIC
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/public
|
${_PUBDIR}
|
||||||
${TARGET_ROOT}/include
|
${TARGET_ROOT}/include
|
||||||
)
|
)
|
||||||
|
|
||||||
|
list( APPEND OPTIONS
|
||||||
if( UNIX )
|
|
||||||
check_cxx_compiler_flag( "-mmmx" HAVE_MMX )
|
|
||||||
if( HAVE_MMX )
|
|
||||||
list( APPEND OPTIONS
|
|
||||||
PRIVATE
|
PRIVATE
|
||||||
-mmmx
|
${MMX_FLAG}
|
||||||
)
|
${SSE_FLAG}
|
||||||
endif()
|
)
|
||||||
|
|
||||||
check_cxx_compiler_flag( "-msse" HAVE_SSE )
|
|
||||||
if( HAVE_SSE )
|
|
||||||
list( APPEND OPTIONS
|
|
||||||
PRIVATE
|
|
||||||
-msse
|
|
||||||
)
|
|
||||||
endif()
|
|
||||||
endif()
|
|
||||||
|
|
||||||
configure_file( soundtouch_config.h.in public/soundtouch_config.h )
|
configure_file( soundtouch_config.h.in public/soundtouch_config.h )
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
|
|
||||||
add_library( ${TARGET} STATIC )
|
add_library( ${TARGET} STATIC )
|
||||||
|
|
||||||
|
def_vars()
|
||||||
|
|
||||||
list( APPEND SOURCES
|
list( APPEND SOURCES
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${TARGET_ROOT}/libtwolame/ath.c
|
${TARGET_ROOT}/libtwolame/ath.c
|
||||||
@@ -26,7 +28,7 @@ list( APPEND SOURCES
|
|||||||
|
|
||||||
list( APPEND INCLUDES
|
list( APPEND INCLUDES
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/private
|
${_PRVDIR}
|
||||||
PUBLIC
|
PUBLIC
|
||||||
${TARGET_ROOT}/libtwolame
|
${TARGET_ROOT}/libtwolame
|
||||||
)
|
)
|
||||||
@@ -38,7 +40,7 @@ list( APPEND DEFINES
|
|||||||
|
|
||||||
list( APPEND OPTIONS
|
list( APPEND OPTIONS
|
||||||
PRIVATE
|
PRIVATE
|
||||||
$<$<C_COMPILER_ID:GNU>:-Wno-implicit-function-declaration>
|
$<$<C_COMPILER_ID:AppleClang,Clang,GNU>:-Wno-implicit-function-declaration>
|
||||||
)
|
)
|
||||||
|
|
||||||
set( PACKAGE_BUGREPORT "twolame-discuss@lists.sourceforge.net" )
|
set( PACKAGE_BUGREPORT "twolame-discuss@lists.sourceforge.net" )
|
||||||
|
|||||||
@@ -1,17 +1,18 @@
|
|||||||
|
|
||||||
add_library( ${TARGET} INTERFACE )
|
add_library( ${TARGET} INTERFACE )
|
||||||
|
add_library( ${symbol} ALIAS ${TARGET} )
|
||||||
|
|
||||||
def_vars()
|
def_vars()
|
||||||
|
|
||||||
message( STATUS "========== Configuring ${TARGET} ==========" )
|
message( STATUS "========== Configuring ${name} ==========" )
|
||||||
|
|
||||||
option( use_system_wxwidgets "Use ${TARGET} system library if available" ${prefer_system_libs} )
|
option( use_system_${name} "Use ${name} system library if available" ${prefer_system_libs} )
|
||||||
if( use_system_wxwidgets )
|
if( use_system_${name} )
|
||||||
find_package(wxWidgets)
|
find_package(wxWidgets)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if( wxWidgets_FOUND )
|
if( wxWidgets_FOUND )
|
||||||
message( STATUS "Using '${TARGET}' system library" )
|
message( STATUS "Using '${name}' system library" )
|
||||||
|
|
||||||
if( wxWidgets_INCLUDE_DIRS_NO_SYSTEM )
|
if( wxWidgets_INCLUDE_DIRS_NO_SYSTEM )
|
||||||
set( INCLUDES
|
set( INCLUDES
|
||||||
@@ -28,25 +29,31 @@ if( wxWidgets_FOUND )
|
|||||||
set( DEFINES
|
set( DEFINES
|
||||||
INTERFACE
|
INTERFACE
|
||||||
${wxWidgets_DEFINITIONS}
|
${wxWidgets_DEFINITIONS}
|
||||||
$<$<CONFIG:Debug>:${wxWidgets_DEFINITIONS_DEBUG}>
|
$<$<CONFIG:Debug>:
|
||||||
|
${wxWidgets_DEFINITIONS_DEBUG}
|
||||||
|
>
|
||||||
)
|
)
|
||||||
|
|
||||||
set( LINKDIRS
|
set( LINKDIRS
|
||||||
INTERFACE
|
INTERFACE
|
||||||
$<$<PLATFORM_ID:Windows>:${wxWidgets_LIB_DIR}>
|
$<$<PLATFORM_ID:Windows>:
|
||||||
|
${wxWidgets_LIB_DIR}
|
||||||
|
>
|
||||||
)
|
)
|
||||||
|
|
||||||
set( LIBRARIES
|
set( LIBRARIES
|
||||||
INTERFACE
|
INTERFACE
|
||||||
${wxWidgets_LIBRARIES}
|
${wxWidgets_LIBRARIES}
|
||||||
$<$<NOT:$<PLATFORM_ID:Windows>>:z>
|
$<$<NOT:$<PLATFORM_ID:Windows>>:
|
||||||
|
z
|
||||||
|
>
|
||||||
)
|
)
|
||||||
|
|
||||||
set( toolkit "${wxWidgets_LIBRARIES}" )
|
set( toolkit "${wxWidgets_LIBRARIES}" )
|
||||||
else()
|
else()
|
||||||
message( STATUS "Using '${TARGET}' system library" )
|
message( STATUS "Using local '${name}' library" )
|
||||||
|
|
||||||
set( use_system_wxwidgets OFF CACHE BOOL "Prefer wxWidgets system library if available" FORCE )
|
set( 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 "" )
|
||||||
@@ -83,7 +90,7 @@ else()
|
|||||||
|
|
||||||
# Causes problems on OSX, so turn it off
|
# Causes problems on OSX, so turn it off
|
||||||
set( wxBUILD_PRECOMP NO )
|
set( wxBUILD_PRECOMP NO )
|
||||||
elseif( CMAKE_SYSTEM_NAME MATCHES "Linux" )
|
elseif( CMAKE_SYSTEM_NAME MATCHES "Linux|FreeBSD" )
|
||||||
# Doesn't yet have accessbility
|
# Doesn't yet have accessbility
|
||||||
set( wxUSE_ACCESSIBILITY NO )
|
set( wxUSE_ACCESSIBILITY NO )
|
||||||
|
|
||||||
@@ -101,13 +108,18 @@ else()
|
|||||||
set_dir_folder( ${WXWIN} "wxWidgets" )
|
set_dir_folder( ${WXWIN} "wxWidgets" )
|
||||||
|
|
||||||
set( INCLUDES
|
set( INCLUDES
|
||||||
$<$<STREQUAL:"${wxUSE_ZLIB}","builtin">:${WXWIN}/src/zlib>
|
$<$<STREQUAL:"${wxUSE_ZLIB}","builtin">:
|
||||||
|
${WXWIN}/src/zlib
|
||||||
|
>
|
||||||
)
|
)
|
||||||
|
|
||||||
set( DEFINES
|
set( DEFINES
|
||||||
WXUSINGDLL
|
WXUSINGDLL
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Do NOT split the generator expressions across multiple lines here.
|
||||||
|
# CMake appears to have a bug and doesn't see to handle it correctly
|
||||||
|
# for target link libraries.
|
||||||
set( LIBRARIES
|
set( LIBRARIES
|
||||||
adv
|
adv
|
||||||
base
|
base
|
||||||
@@ -129,26 +141,37 @@ else()
|
|||||||
# since wxRegex compile defines do not include __WXOSX_COCOA__. So,
|
# since wxRegex compile defines do not include __WXOSX_COCOA__. So,
|
||||||
# add it here.
|
# add it here.
|
||||||
target_compile_definitions( wxregex PRIVATE "__WXOSX_COCOA__" )
|
target_compile_definitions( wxregex PRIVATE "__WXOSX_COCOA__" )
|
||||||
elseif( CMAKE_SYSTEM_NAME MATCHES "Linux" )
|
|
||||||
set( toolkit "${wxBUILD_TOOLKIT}" )
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set( toolkit "${wxBUILD_TOOLKIT}" )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if( CMAKE_SYSTEM_NAME MATCHES "Linux" )
|
if( "${toolkit}" MATCHES ".*gtk2.*" )
|
||||||
# We need the system GTK/GLIB packages
|
|
||||||
if( "${toolkit}" MATCHES ".*gtk2.*" )
|
|
||||||
set( gtk gtk+-2.0 )
|
set( gtk gtk+-2.0 )
|
||||||
set( glib glib-2.0 )
|
set( glib glib-2.0 )
|
||||||
elseif( "${toolkit}" MATCHES ".*gtk3.*" )
|
set( wxTOOLKIT "GTK2" CACHE INTERNAL "" )
|
||||||
|
set( wxIS_GTK YES CACHE INTERNAL "" )
|
||||||
|
elseif( "${toolkit}" MATCHES ".*gtk3.*" )
|
||||||
set( gtk gtk+-3.0 )
|
set( gtk gtk+-3.0 )
|
||||||
set( glib glib-2.0 )
|
set( glib glib-2.0 )
|
||||||
elseif( "${toolkit}" MATCHES ".*gtk4.*" )
|
set( wxTOOLKIT "GTK3" CACHE INTERNAL "" )
|
||||||
|
set( wxIS_GTK YES CACHE INTERNAL "" )
|
||||||
|
elseif( "${toolkit}" MATCHES ".*gtk4.*" )
|
||||||
set( gtk gtk+-4.0 )
|
set( gtk gtk+-4.0 )
|
||||||
set( glib glib-2.0 )
|
set( glib glib-2.0 )
|
||||||
else()
|
set( wxTOOLKIT "GTK4" CACHE INTERNAL "" )
|
||||||
message( FATAL_ERROR "Unrecognized wxGTK version: ${wxBUILD_TOOLKIT}" )
|
set( wxIS_GTK YES CACHE INTERNAL "" )
|
||||||
endif()
|
elseif( "${toolkit}" MATCHES ".*msw.*" )
|
||||||
|
set( wxTOOLKIT "MSW" CACHE INTERNAL "" )
|
||||||
|
set( wxIS_WIN YES CACHE INTERNAL "" )
|
||||||
|
elseif( "${toolkit}" MATCHES ".*osx.*" )
|
||||||
|
set( wxTOOLKIT "MAC" CACHE INTERNAL "" )
|
||||||
|
set( wxIS_MAC YES CACHE INTERNAL "" )
|
||||||
|
else()
|
||||||
|
message( FATAL_ERROR "Unrecognized wxWidgets toolkit" )
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if( "${wxTOOLKIT}" MATCHES "GTK." )
|
||||||
pkg_check_modules( GTK REQUIRED IMPORTED_TARGET GLOBAL ${gtk} )
|
pkg_check_modules( GTK REQUIRED IMPORTED_TARGET GLOBAL ${gtk} )
|
||||||
pkg_check_modules( GLIB REQUIRED IMPORTED_TARGET GLOBAL ${glib} )
|
pkg_check_modules( GLIB REQUIRED IMPORTED_TARGET GLOBAL ${glib} )
|
||||||
endif()
|
endif()
|
||||||
@@ -158,3 +181,4 @@ target_compile_definitions( ${TARGET} INTERFACE ${DEFINES} )
|
|||||||
target_link_directories( ${TARGET} INTERFACE ${LINKDIRS} )
|
target_link_directories( ${TARGET} INTERFACE ${LINKDIRS} )
|
||||||
target_link_libraries( ${TARGET} INTERFACE ${LIBRARIES} )
|
target_link_libraries( ${TARGET} INTERFACE ${LIBRARIES} )
|
||||||
|
|
||||||
|
INSTALL( TARGETS ${TARGET} DESTINATION ${_LIBDIR} )
|
||||||
@@ -130,7 +130,7 @@ endif()
|
|||||||
|
|
||||||
if( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
|
if( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
|
||||||
set( locale "${_DEST}/Resources" )
|
set( locale "${_DEST}/Resources" )
|
||||||
elseif( CMAKE_SYSTEM_NAME MATCHES "Linux" )
|
elseif( CMAKE_SYSTEM_NAME MATCHES "Linux|FreeBSD" )
|
||||||
set( locale "${_DEST}/locale" )
|
set( locale "${_DEST}/locale" )
|
||||||
elseif( CMAKE_SYSTEM_NAME MATCHES "Windows" )
|
elseif( CMAKE_SYSTEM_NAME MATCHES "Windows" )
|
||||||
set( locale "${_DEST}/Languanges" )
|
set( locale "${_DEST}/Languanges" )
|
||||||
@@ -142,7 +142,7 @@ foreach( source ${SOURCES} )
|
|||||||
|
|
||||||
if( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
|
if( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
|
||||||
set( dst "${locale}/${lang}.lproj" )
|
set( dst "${locale}/${lang}.lproj" )
|
||||||
elseif( CMAKE_SYSTEM_NAME MATCHES "Linux" )
|
elseif( CMAKE_SYSTEM_NAME MATCHES "Linux|FreeBSD" )
|
||||||
set( dst "${locale}/${lang}/LC_MESSAGES" )
|
set( dst "${locale}/${lang}/LC_MESSAGES" )
|
||||||
elseif( CMAKE_SYSTEM_NAME MATCHES "Windows" )
|
elseif( CMAKE_SYSTEM_NAME MATCHES "Windows" )
|
||||||
set( dst "${locale}/${lang}" )
|
set( dst "${locale}/${lang}" )
|
||||||
|
|||||||
@@ -479,55 +479,76 @@ list( APPEND SOURCES
|
|||||||
|
|
||||||
# VST Effects
|
# VST Effects
|
||||||
|
|
||||||
$<$<BOOL:USE_VST>:effects/VST/VSTControl.h>
|
$<$<BOOL:${USE_VST}>:
|
||||||
$<$<BOOL:USE_VST>:effects/VST/VSTEffect.cpp>
|
effects/VST/VSTControl.h
|
||||||
$<$<BOOL:USE_VST>:effects/VST/VSTEffect.h>
|
effects/VST/VSTEffect.cpp
|
||||||
$<$<BOOL:USE_VST>:effects/VST/aeffectx.h>
|
effects/VST/VSTEffect.h
|
||||||
$<$<AND:$<BOOL:USE_VST>,$<PLATFORM_ID:Linux>>:effects/VST/VSTControlGTK.cpp>
|
effects/VST/aeffectx.h
|
||||||
$<$<AND:$<BOOL:USE_VST>,$<PLATFORM_ID:Linux>>:effects/VST/VSTControlGTK.h>
|
>
|
||||||
$<$<AND:$<BOOL:USE_VST>,$<PLATFORM_ID:Windows>>:effects/VST/VSTControlMSW.cpp>
|
|
||||||
$<$<AND:$<BOOL:USE_VST>,$<PLATFORM_ID:Windows>>:effects/VST/VSTControlMSW.h>
|
$<$<AND:$<BOOL:${USE_VST}>,$<BOOL:${wxIS_GTK}>>:
|
||||||
$<$<AND:$<BOOL:USE_VST>,$<PLATFORM_ID:Darwin>>:effects/VST/VSTControlOSX.h>
|
effects/VST/VSTControlGTK.cpp
|
||||||
$<$<AND:$<BOOL:USE_VST>,$<PLATFORM_ID:Darwin>>:effects/VST/VSTControlOSX.mm>
|
effects/VST/VSTControlGTK.h
|
||||||
|
>
|
||||||
|
|
||||||
|
$<$<AND:$<BOOL:${USE_VST}>,$<BOOL:${wxIS_WIN}>>:
|
||||||
|
effects/VST/VSTControlMSW.cpp
|
||||||
|
effects/VST/VSTControlMSW.h
|
||||||
|
>
|
||||||
|
|
||||||
|
$<$<AND:$<BOOL:${USE_VST}>,$<BOOL:${wxIS_MAC}>>:
|
||||||
|
effects/VST/VSTControlOSX.h
|
||||||
|
effects/VST/VSTControlOSX.mm
|
||||||
|
>
|
||||||
|
|
||||||
# Audio Unit Effects
|
# Audio Unit Effects
|
||||||
|
|
||||||
$<$<AND:$<BOOL:USE_AUDIO_UNITS>,$<PLATFORM_ID:Darwin>>:effects/audiounits/AUControl.h>
|
$<$<AND:$<BOOL:${USE_AUDIO_UNITS}>,$<BOOL:${wxIS_MAC}>>:
|
||||||
$<$<AND:$<BOOL:USE_AUDIO_UNITS>,$<PLATFORM_ID:Darwin>>:effects/audiounits/AUControl.mm>
|
effects/audiounits/AUControl.h
|
||||||
$<$<AND:$<BOOL:USE_AUDIO_UNITS>,$<PLATFORM_ID:Darwin>>:effects/audiounits/AudioUnitEffect.cpp>
|
effects/audiounits/AUControl.mm
|
||||||
$<$<AND:$<BOOL:USE_AUDIO_UNITS>,$<PLATFORM_ID:Darwin>>:effects/audiounits/AudioUnitEffect.h>
|
effects/audiounits/AudioUnitEffect.cpp
|
||||||
|
effects/audiounits/AudioUnitEffect.h
|
||||||
|
>
|
||||||
|
|
||||||
# Ladspa Effects
|
# Ladspa Effects
|
||||||
|
|
||||||
$<$<BOOL:USE_LADSPA>:effects/ladspa/LadspaEffect.cpp>
|
$<$<BOOL:${USE_LADSPA}>:
|
||||||
$<$<BOOL:USE_LADSPA>:effects/ladspa/LadspaEffect.h>
|
effects/ladspa/LadspaEffect.cpp
|
||||||
$<$<BOOL:USE_LADSPA>:effects/ladspa/ladspa.h>
|
effects/ladspa/LadspaEffect.h
|
||||||
|
effects/ladspa/ladspa.h
|
||||||
|
>
|
||||||
|
|
||||||
# LV2 Effects
|
# LV2 Effects
|
||||||
|
|
||||||
$<$<BOOL:USE_LV2>:effects/lv2/LV2Effect.cpp>
|
$<$<BOOL:${USE_LV2}>:
|
||||||
$<$<BOOL:USE_LV2>:effects/lv2/LV2Effect.h>
|
effects/lv2/LV2Effect.cpp
|
||||||
$<$<BOOL:USE_LV2>:effects/lv2/LoadLV2.cpp>
|
effects/lv2/LV2Effect.h
|
||||||
$<$<BOOL:USE_LV2>:effects/lv2/LoadLV2.h>
|
effects/lv2/LoadLV2.cpp
|
||||||
$<$<BOOL:USE_LV2>:effects/lv2/NativeWindow.h>
|
effects/lv2/LoadLV2.h
|
||||||
$<$<BOOL:USE_LV2>:effects/lv2/lv2_external_ui.h>
|
effects/lv2/NativeWindow.h
|
||||||
$<$<BOOL:USE_LV2>:effects/lv2/zix/common.h>
|
effects/lv2/lv2_external_ui.h
|
||||||
$<$<BOOL:USE_LV2>:effects/lv2/zix/ring.cpp>
|
effects/lv2/zix/common.h
|
||||||
$<$<BOOL:USE_LV2>:effects/lv2/zix/ring.h>
|
effects/lv2/zix/ring.cpp
|
||||||
|
effects/lv2/zix/ring.h
|
||||||
|
>
|
||||||
|
|
||||||
# Nyquist Effects
|
# Nyquist Effects
|
||||||
|
|
||||||
$<$<BOOL:USE_NYQUIST>:effects/nyquist/LoadNyquist.cpp>
|
$<$<BOOL:${USE_NYQUIST}>:
|
||||||
$<$<BOOL:USE_NYQUIST>:effects/nyquist/LoadNyquist.h>
|
effects/nyquist/LoadNyquist.cpp
|
||||||
$<$<BOOL:USE_NYQUIST>:effects/nyquist/Nyquist.cpp>
|
effects/nyquist/LoadNyquist.h
|
||||||
$<$<BOOL:USE_NYQUIST>:effects/nyquist/Nyquist.h>
|
effects/nyquist/Nyquist.cpp
|
||||||
|
effects/nyquist/Nyquist.h
|
||||||
|
>
|
||||||
|
|
||||||
# VAMP Effects
|
# VAMP Effects
|
||||||
|
|
||||||
$<$<BOOL:USE_VAMP>:effects/vamp/LoadVamp.cpp>
|
$<$<BOOL:${USE_VAMP}>:
|
||||||
$<$<BOOL:USE_VAMP>:effects/vamp/LoadVamp.h>
|
effects/vamp/LoadVamp.cpp
|
||||||
$<$<BOOL:USE_VAMP>:effects/vamp/VampEffect.cpp>
|
effects/vamp/LoadVamp.h
|
||||||
$<$<BOOL:USE_VAMP>:effects/vamp/VampEffect.h>
|
effects/vamp/VampEffect.cpp
|
||||||
|
effects/vamp/VampEffect.h
|
||||||
|
>
|
||||||
|
|
||||||
# Export
|
# Export
|
||||||
|
|
||||||
@@ -542,14 +563,24 @@ list( APPEND SOURCES
|
|||||||
export/ExportMultiple.h
|
export/ExportMultiple.h
|
||||||
export/ExportPCM.cpp
|
export/ExportPCM.cpp
|
||||||
|
|
||||||
|
|
||||||
# Optional exporters
|
# Optional exporters
|
||||||
$<$<BOOL:USE_FFMPEG>:export/ExportFFmpeg.cpp>
|
$<$<BOOL:${USE_FFMPEG}>:
|
||||||
$<$<BOOL:USE_FFMPEG>:export/ExportFFmpegDialogs.cpp>
|
export/ExportFFmpeg.cpp
|
||||||
$<$<BOOL:USE_FFMPEG>:export/ExportFFmpegDialogs.h>
|
export/ExportFFmpegDialogs.cpp
|
||||||
$<$<BOOL:USE_FLAC>:export/ExportFLAC.cpp>
|
export/ExportFFmpegDialogs.h
|
||||||
$<$<BOOL:USE_TWOLAME>:export/ExportMP2.cpp>
|
>
|
||||||
$<$<BOOL:USE_LIBVORBIS>:export/ExportOGG.cpp>
|
|
||||||
|
$<$<BOOL:${USE_LIBFLAC}>:
|
||||||
|
export/ExportFLAC.cpp
|
||||||
|
>
|
||||||
|
|
||||||
|
$<$<BOOL:${USE_LIBTWOLAME}>:
|
||||||
|
export/ExportMP2.cpp
|
||||||
|
>
|
||||||
|
|
||||||
|
$<$<BOOL:${USE_LIBVORBIS}>:
|
||||||
|
export/ExportOGG.cpp
|
||||||
|
>
|
||||||
|
|
||||||
# Import
|
# Import
|
||||||
|
|
||||||
@@ -575,14 +606,30 @@ list( APPEND SOURCES
|
|||||||
|
|
||||||
# Optional importers
|
# Optional importers
|
||||||
|
|
||||||
$<$<BOOL:USE_FFMPEG>:import/ImportFFmpeg.cpp>
|
$<$<BOOL:${USE_FFMPEG}>:
|
||||||
$<$<BOOL:USE_FLAC>:import/ImportFLAC.cpp>
|
import/ImportFFmpeg.cpp
|
||||||
$<$<BOOL:USE_GSTREAMER>:import/ImportGStreamer.cpp>
|
>
|
||||||
$<$<BOOL:USE_MIDI>:import/ImportMIDI.cpp>
|
|
||||||
$<$<BOOL:USE_MIDI>:import/ImportMIDI.h>
|
$<$<BOOL:${USE_LIBFLAC}>:
|
||||||
$<$<BOOL:USE_LIBMAD>:import/ImportMP3.cpp>
|
import/ImportFLAC.cpp
|
||||||
$<$<BOOL:USE_LIBVORBIS>:import/ImportOGG.cpp>
|
>
|
||||||
# import/ImportQT.cpp
|
|
||||||
|
$<$<BOOL:${USE_GSTREAMER}>:
|
||||||
|
import/ImportGStreamer.cpp
|
||||||
|
>
|
||||||
|
|
||||||
|
$<$<BOOL:${USE_MIDI}>:
|
||||||
|
import/ImportMIDI.cpp
|
||||||
|
import/ImportMIDI.h
|
||||||
|
>
|
||||||
|
|
||||||
|
$<$<BOOL:${USE_LIBMAD}>:
|
||||||
|
import/ImportMP3.cpp
|
||||||
|
>
|
||||||
|
|
||||||
|
$<$<BOOL:${USE_LIBVORBIS}>:
|
||||||
|
import/ImportOGG.cpp
|
||||||
|
>
|
||||||
|
|
||||||
# Menus
|
# Menus
|
||||||
|
|
||||||
@@ -914,8 +961,10 @@ list( APPEND INCLUDES
|
|||||||
#
|
#
|
||||||
#
|
#
|
||||||
list( APPEND RESOURCES
|
list( APPEND RESOURCES
|
||||||
$<$<PLATFORM_ID:Windows>:../win/audacity.rc>
|
$<$<PLATFORM_ID:Windows>:
|
||||||
$<$<PLATFORM_ID:Windows>:../win/packages.config>
|
../win/audacity.rc
|
||||||
|
../win/packages.config
|
||||||
|
>
|
||||||
)
|
)
|
||||||
|
|
||||||
#
|
#
|
||||||
@@ -953,7 +1002,7 @@ list( APPEND DEFINES
|
|||||||
|
|
||||||
list( APPEND OPTIONS
|
list( APPEND OPTIONS
|
||||||
PRIVATE
|
PRIVATE
|
||||||
$<$<PLATFORM_ID:Windows>:/permissive->
|
$<$<CXX_COMPILER_ID:MSVC>:/permissive->
|
||||||
# $<$<CXX_COMPILER_ID:GNU>:-Wl,-rpath -Wl,${_RPATH}>
|
# $<$<CXX_COMPILER_ID:GNU>:-Wl,-rpath -Wl,${_RPATH}>
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -968,7 +1017,7 @@ list( APPEND LDFLAGS
|
|||||||
list( APPEND LIBRARIES
|
list( APPEND LIBRARIES
|
||||||
PRIVATE
|
PRIVATE
|
||||||
${CMAKE_REQUIRED_LIBRARIES}
|
${CMAKE_REQUIRED_LIBRARIES}
|
||||||
wxwidgets
|
wxWidgets
|
||||||
FileDialog
|
FileDialog
|
||||||
expat
|
expat
|
||||||
lame
|
lame
|
||||||
@@ -976,36 +1025,44 @@ list( APPEND LIBRARIES
|
|||||||
libsoxr
|
libsoxr
|
||||||
lib-widget-extra
|
lib-widget-extra
|
||||||
portaudio-v19
|
portaudio-v19
|
||||||
$<$<BOOL:USE_FFMPEG>:libavcodec>
|
# $<$<BOOL:${USE_FFMPEG}>:ibavcodec>
|
||||||
$<$<BOOL:USE_FFMPEG>:libavformat>
|
# $<$<BOOL:${USE_FFMPEG}>:libavformat>
|
||||||
$<$<BOOL:USE_FFMPEG>:libavutil>
|
# $<$<BOOL:${USE_FFMPEG}>:libavutil>
|
||||||
$<$<BOOL:USE_LIBID3TAG>:libid3tag>
|
$<$<BOOL:${USE_FFMPEG}>:ffmpeg>
|
||||||
$<$<BOOL:USE_LIBFLAC>:libflac>
|
$<$<BOOL:${USE_LIBID3TAG}>:libid3tag>
|
||||||
$<$<BOOL:USE_LIBFLAC>:libflac++>
|
|
||||||
$<$<BOOL:USE_LIBMAD>:libmad>
|
# This flac mess can be resolved by removing the Windows pragmas
|
||||||
$<$<BOOL:USE_LIBVORBIS>:libogg>
|
# in AudacityApp.cpp.
|
||||||
$<$<BOOL:USE_LIBVORBIS>:libvorbis>
|
$<$<BOOL:${USE_LIBFLAC}>:flac>
|
||||||
$<$<BOOL:USE_LIBVORBIS>:libvorbisenc>
|
$<$<BOOL:${USE_LIBFLAC}>:flac++>
|
||||||
$<$<BOOL:USE_LIBVORBIS>:libvorbisfile>
|
$<$<BOOL:${USE_LIBFLAC}>:libflac>
|
||||||
$<$<BOOL:USE_LIBTWOLAME>:twolame>
|
|
||||||
$<$<BOOL:USE_LV2>:lv2>
|
$<$<BOOL:${USE_LIBMAD}>:libmad>
|
||||||
$<$<BOOL:USE_MIDI>:portmidi>
|
$<$<BOOL:${USE_LIBVORBIS}>:libogg>
|
||||||
$<$<BOOL:USE_MIDI>:portsmf>
|
$<$<BOOL:${USE_LIBVORBIS}>:libvorbis>
|
||||||
$<$<BOOL:USE_NYQUIST>:libnyquist>
|
# $<$<BOOL:${USE_LIBVORBIS}>:libvorbis>
|
||||||
$<$<BOOL:USE_PORTMIXER>:portmixer>
|
# $<$<BOOL:${USE_LIBVORBIS}>:libvorbisenc>
|
||||||
$<$<BOOL:USE_SBSMS>:sbsms>
|
# $<$<BOOL:${USE_LIBVORBIS}>:libvorbisfile>
|
||||||
$<$<BOOL:USE_SOUNDTOUCH>:soundtouch>
|
$<$<BOOL:${USE_LIBTWOLAME}>:twolame>
|
||||||
$<$<BOOL:USE_VAMP>:libvamp>
|
$<$<BOOL:${USE_LV2}>:lv2>
|
||||||
$<$<BOOL:USE_VAMP>:libvamp-hostsdk>
|
$<$<BOOL:${USE_MIDI}>:portmidi>
|
||||||
|
$<$<BOOL:${USE_MIDI}>:portsmf>
|
||||||
|
$<$<BOOL:${USE_NYQUIST}>:libnyquist>
|
||||||
|
$<$<BOOL:${USE_PORTMIXER}>:portmixer>
|
||||||
|
$<$<BOOL:${USE_SBSMS}>:sbsms>
|
||||||
|
$<$<BOOL:${USE_SOUNDTOUCH}>:soundtouch>
|
||||||
|
$<$<BOOL:${USE_VAMP}>:libvamp>
|
||||||
|
# $<$<BOOL:${USE_VAMP}>:libvamp-hostsdk>
|
||||||
|
$<$<PLATFORM_ID:Linux,FreeBSD>:PkgConfig::GLIB>
|
||||||
|
$<$<PLATFORM_ID:Linux,FreeBSD>:z>
|
||||||
|
$<$<PLATFORM_ID:Linux,FreeBSD>:pthread>
|
||||||
)
|
)
|
||||||
|
|
||||||
#
|
#
|
||||||
# If was have cmake 3.16 or higher, we can use precompiled headers
|
# If was have cmake 3.16 or higher, we can use precompiled headers
|
||||||
#
|
#
|
||||||
if( CMAKE_VERSION VERSION_GREATER_EQUAL "3.16" )
|
if( CMAKE_VERSION VERSION_GREATER_EQUAL "3.16" )
|
||||||
list( APPEND PRECOMP
|
set( PRECOMP AudacityHeaders.h )
|
||||||
AudacityHeaders.h
|
|
||||||
)
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Handle Ladspa option
|
# Handle Ladspa option
|
||||||
@@ -1062,12 +1119,11 @@ if( CMAKE_SYSTEM_NAME MATCHES "Windows" )
|
|||||||
set( wxlibs "${CMAKE_BINARY_DIR}" )
|
set( wxlibs "${CMAKE_BINARY_DIR}" )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
file( TO_NATIVE_PATH ${_DEST} dest )
|
|
||||||
add_custom_command(
|
add_custom_command(
|
||||||
TARGET
|
TARGET
|
||||||
${TARGET}
|
${TARGET}
|
||||||
COMMAND
|
COMMAND
|
||||||
XCOPY "*.dll" ${dest} /I /R /Y
|
XCOPY "*.dll" $<SHELL_PATH:${_DEST}> /I /R /Y
|
||||||
WORKING_DIRECTORY
|
WORKING_DIRECTORY
|
||||||
"${wxlibs}/lib/vc_dll"
|
"${wxlibs}/lib/vc_dll"
|
||||||
POST_BUILD
|
POST_BUILD
|
||||||
@@ -1106,6 +1162,7 @@ elseif( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
|
|||||||
list(APPEND LIBRARIES
|
list(APPEND LIBRARIES
|
||||||
PRIVATE
|
PRIVATE
|
||||||
"-framework AudioUnit"
|
"-framework AudioUnit"
|
||||||
|
"-framework CoreAudio"
|
||||||
"-framework CoreAudioKit"
|
"-framework CoreAudioKit"
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -1139,9 +1196,7 @@ elseif( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
|
|||||||
TARGET
|
TARGET
|
||||||
${TARGET}
|
${TARGET}
|
||||||
COMMAND
|
COMMAND
|
||||||
sh -c "TARGET_BUILD_DIR=${_DEST} EXECUTABLE_PATH=${_EXEDIR}/${_EXE} FRAMEWORKS_FOLDER_PATH=Frameworks ${topdir}/mac/scripts/install_wxlibs.sh"
|
sh -c "TARGET_BUILD_DIR=${_DEST} EXECUTABLE_PATH=Macos/${_EXE} FRAMEWORKS_FOLDER_PATH=Frameworks ${topdir}/mac/scripts/install_wxlibs.sh"
|
||||||
# WORKING_DIRECTORY
|
|
||||||
# ${CMAKE_BINARY_DIR}/lib
|
|
||||||
POST_BUILD
|
POST_BUILD
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
@@ -1163,43 +1218,46 @@ elseif( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
|
|||||||
organize_source( "${WRAPPER_ROOT}" "mac" "${WRAPPER_SOURCES}" )
|
organize_source( "${WRAPPER_ROOT}" "mac" "${WRAPPER_SOURCES}" )
|
||||||
|
|
||||||
target_sources( "Wrapper" PRIVATE ${WRAPPER_SOURCES} )
|
target_sources( "Wrapper" PRIVATE ${WRAPPER_SOURCES} )
|
||||||
elseif( CMAKE_SYSTEM_NAME MATCHES "Linux" )
|
elseif( CMAKE_SYSTEM_NAME MATCHES "Linux|FreeBSD" )
|
||||||
set( _EXE "audacity" )
|
set( _EXE "audacity" )
|
||||||
|
|
||||||
# Add additional library requirements
|
|
||||||
list( APPEND LIBRARIES
|
|
||||||
PRIVATE
|
|
||||||
PkgConfig::GLIB
|
|
||||||
z
|
|
||||||
pthread
|
|
||||||
)
|
|
||||||
|
|
||||||
# Create the config file
|
# Create the config file
|
||||||
set( HAVE_VISIBILITY 1 )
|
set( HAVE_VISIBILITY 1 )
|
||||||
configure_file( audacity_config.h.in private/configunix.h )
|
configure_file( audacity_config.h.in private/configunix.h )
|
||||||
|
|
||||||
# Create the MIMETYPES list (must be a better way...)
|
# Create the MIMETYPES list
|
||||||
if( USE_FFMPEG)
|
list( APPEND MIMETYPES
|
||||||
list( APPEND MIMETYPES "audio/aac;audio/ac3;audio/mp4;audio/x-ms-wma;video/mpeg" )
|
$<$<BOOL:${USE_FFMPEG}>:
|
||||||
endif()
|
audio/aac
|
||||||
if( USE_LIBFLAC)
|
audio/ac3
|
||||||
list( APPEND MIMETYPES "audio/flac;audio/x-flac" )
|
audio/mp4
|
||||||
endif()
|
audio/x-ms-wma
|
||||||
if( USE_LIBMAD )
|
video/mpeg
|
||||||
list( APPEND MIMETYPES "audio/mpeg" )
|
>
|
||||||
endif()
|
$<$<BOOL:${USE_LIBFLAC}>:
|
||||||
if( USE_SNDFILE )
|
audio/flac
|
||||||
list( APPEND MIMETYPES "audio/basic;audio/x-aiff;audio/x-wav" )
|
audio/x-flac
|
||||||
endif()
|
>
|
||||||
if( USE_LIBOGG AND USE_LIBVORBIS )
|
$<$<BOOL:${USE_LIBMAD}>:
|
||||||
list( APPEND MIMETYPES "application/ogg;audio/x-vorbis+ogg" )
|
audio/mpeg
|
||||||
endif()
|
>
|
||||||
|
$<$<BOOL:${USE_SNDFILE}>:
|
||||||
|
audio/basic
|
||||||
|
audio/x-aiff
|
||||||
|
audio/x-wav
|
||||||
|
>
|
||||||
|
$<$<AND:$<BOOL:${USE_LIBOGG},${USE_LIBVORBIS}>>:
|
||||||
|
application/ogg
|
||||||
|
audio/x-vorbis+ogg
|
||||||
|
>
|
||||||
|
)
|
||||||
|
|
||||||
# Create the desktop file
|
# Create the desktop file
|
||||||
set( AUDACITY_NAME "${_EXE}" )
|
set( AUDACITY_NAME "${_EXE}" )
|
||||||
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 )
|
||||||
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
|
||||||
@@ -1219,7 +1277,7 @@ elseif( CMAKE_SYSTEM_NAME MATCHES "Linux" )
|
|||||||
${WXWIN}/lib
|
${WXWIN}/lib
|
||||||
POST_BUILD
|
POST_BUILD
|
||||||
)
|
)
|
||||||
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set_target_property_all( ${TARGET} RUNTIME_OUTPUT_NAME ${_EXE} )
|
set_target_property_all( ${TARGET} RUNTIME_OUTPUT_NAME ${_EXE} )
|
||||||
@@ -1253,7 +1311,10 @@ target_compile_options( ${TARGET} PRIVATE ${OPTIONS} )
|
|||||||
target_include_directories( ${TARGET} PRIVATE ${INCLUDES} )
|
target_include_directories( ${TARGET} PRIVATE ${INCLUDES} )
|
||||||
target_link_options( "${TARGET}" PRIVATE ${LDFLAGS} )
|
target_link_options( "${TARGET}" PRIVATE ${LDFLAGS} )
|
||||||
target_link_libraries( ${TARGET} PRIVATE ${LIBRARIES} )
|
target_link_libraries( ${TARGET} PRIVATE ${LIBRARIES} )
|
||||||
target_precompile_headers( ${TARGET} PRIVATE ${PRECOMP} )
|
|
||||||
|
if( PRECOMP )
|
||||||
|
target_precompile_headers( ${TARGET} PRIVATE ${PRECOMP} )
|
||||||
|
endif()
|
||||||
|
|
||||||
if( NOT "${CMAKE_GENERATOR}" MATCHES "Xcode|Visual Studio*" )
|
if( NOT "${CMAKE_GENERATOR}" MATCHES "Xcode|Visual Studio*" )
|
||||||
if( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
|
if( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
|
||||||
|
|||||||
@@ -28,6 +28,9 @@
|
|||||||
/* Define if you have C99's lrintf function. */
|
/* Define if you have C99's lrintf function. */
|
||||||
#cmakedefine HAVE_LRINTF 1
|
#cmakedefine HAVE_LRINTF 1
|
||||||
|
|
||||||
|
/* Define if you have the mlock functions. */
|
||||||
|
#cmakedefine HAVE_MLOCK 1
|
||||||
|
|
||||||
/* Define to 1 or 0, depending whether the compiler supports simple visibility
|
/* Define to 1 or 0, depending whether the compiler supports simple visibility
|
||||||
declarations. */
|
declarations. */
|
||||||
#cmakedefine HAVE_VISIBILITY 1
|
#cmakedefine HAVE_VISIBILITY 1
|
||||||
|
|||||||
Reference in New Issue
Block a user