audacia/cmake-proxies/CMakeLists.txt

196 lines
5.4 KiB
CMake
Raw Normal View History

add_conan_lib(
ZLIB
zlib/1.2.11
REQUIRED
2021-05-25 13:05:46 +00:00
PKG_CONFIG "zlib >= 1.2.11"
INTERFACE_NAME ZLIB::ZLIB
OPTION_NAME zlib
CONAN_OPTIONS
zlib:shared=True
Reworked cmake command options And fixed a recursion problem when copying DLLs to dest folder The command options are now: // Enable Audio Unit plug-in support audacity_enable_audiounits:BOOL=ON // Library preference [system (if available), local] audacity_lib_preference:STRING=system // Use FileDialog library [local] audacity_use_FileDialog:STRING=local // Use expat library [local] audacity_use_expat:STRING=local // Use ffmpeg library [loaded, off] audacity_use_ffmpeg:STRING=off // Use flac library [system (if available), local, off] audacity_use_flac:STRING=local // Use id3tag library [system (if available), local, off] audacity_use_id3tag:STRING=local // Use LADSPA plug-in support [on, off] audacity_use_ladspa:BOOL=ON // Use lame library [system (if available), local] audacity_use_lame:STRING=local // Use libextra library [local] audacity_use_libextra:STRING=local // Use lv2 library [system (if available), local, off] audacity_use_lv2:STRING=local // Use mad library [system (if available), local, off] audacity_use_mad:STRING=local // Use midi library [system (if available), local, off] audacity_use_midi:STRING=local // Use nyquist library [local, off] audacity_use_nyquist:STRING=local // Use ogg library [system (if available), local, off] audacity_use_ogg:STRING=local // Use the portaudio CoreAudio interface if available audacity_use_pa_coreaudio:BOOL=YES // Use the JACK audio interface if available [loaded, linked, off] audacity_use_pa_jack:STRING=off // Use the OSS audio interface if available audacity_use_pa_oss:BOOL=NO // Use portaudio library [local] audacity_use_portaudio:STRING=local // Use portmixer library [local, off] audacity_use_portmixer:STRING=local // Use portsmf library [system (if available), local, off] audacity_use_portsmf:STRING=local // Use sbsms library [system (if available), local, off] audacity_use_sbsms:STRING=local // Use sndfile library [system (if available), local] audacity_use_sndfile:STRING=local // Use soundtouch library [system (if available), local, off] audacity_use_soundtouch:STRING=local // Use soxr library [system (if available), local] audacity_use_soxr:STRING=local // Use twolame library [system (if available), local, off] audacity_use_twolame:STRING=local // Use vamp library [system (if available), local, off] audacity_use_vamp:STRING=local // Use vorbis library [system (if available), local, off] audacity_use_vorbis:STRING=local // Use VST2 plug-in support [on, off] audacity_use_vst:BOOL=ON // Use wxwidgets library [system (if available), local] audacity_use_wxwidgets:STRING=system
2020-02-14 21:56:33 +00:00
)
add_conan_lib(
expat
expat/2.2.9@audacity/stable
REQUIRED
2021-05-25 13:05:46 +00:00
PKG_CONFIG "expat >= 2.1.0"
CONAN_OPTIONS
expat:shared=True
)
2021-05-04 18:43:19 +00:00
if(${_OPT}has_crashreports)
add_conan_lib(breakpad breakpad/0.1 REQUIRED)
endif()
set( wx_zlib "zlib" )
set( wx_png "libpng" )
set( wx_jpeg "libjpeg-turbo")
set( wx_tiff "off" )
set( id3tag_zlib "conan" )
if ( ${_OPT}use_zlib STREQUAL "system" )
set( wx_zlib "sys" )
# To prevent linking conflicts - we need to use system libpng as well.
# wxWdigets will attempt to resolve it using find_package
find_required_package( PNG "libpng-dev" )
set( wx_png "sys" )
# And, for consistency
find_required_package( JPEG "libjpeg-turbo8-dev" )
set( wx_jpeg "sys" )
set( id3tag_zlib "system" )
endif()
set(wx_expat "expat")
if (${_OPT}use_expat STREQUAL "system")
set(wx_expat "sys")
endif()
add_conan_lib(
wxWidgets
wxwidgets/3.1.3.1-audacity
REQUIRED
ALWAYS_ALLOW_CONAN_FALLBACK
OPTION_NAME wxwidgets
FIND_PACKAGE_OPTIONS COMPONENTS adv base core html qa xml net
INTERFACE_NAME wxwidgets::wxwidgets
CONAN_OPTIONS
wxwidgets:shared=True
wxwidgets:zlib=${wx_zlib}
wxwidgets:expat=${wx_expat}
wxwidgets:compatibility=3.0
wxwidgets:png=${wx_png}
wxwidgets:jpeg=${wx_jpeg}
wxwidgets:tiff=${wx_tiff}
wxwidgets:secretstore=False
wxwidgets:opengl=False
wxwidgets:propgrid=False
wxwidgets:ribbon=False
wxwidgets:richtext=False
wxwidgets:stc=False
wxwidgets:webview=False
wxwidgets:help=False
wxwidgets:html_help=False
wxwidgets:fs_inet=False
wxwidgets:protocol=False
# Building with SIMD requires a huge number of build dependencies
# Probably this will be enabled in the future
libjpeg-turbo:SIMD=False
)
add_conan_lib(
libmp3lame
libmp3lame/3.100
REQUIRED
INTERFACE_NAME libmp3lame::libmp3lame
2021-05-25 13:05:46 +00:00
PKG_CONFIG "lame >= 3.100"
)
add_conan_lib(
libid3tag
libid3tag/0.15.2b@audacity/stable
2021-06-16 12:09:52 +00:00
OPTION_NAME libid3tag
2021-05-25 13:05:46 +00:00
PKG_CONFIG "id3tag >= 0.15.1b"
CONAN_OPTIONS
libid3tag:zlib=${id3tag_zlib}
)
add_conan_lib(
libmad
libmad/0.15.2b@audacity/stable
2021-06-16 12:09:52 +00:00
OPTION_NAME libmad
2021-05-25 13:05:46 +00:00
PKG_CONFIG "mad >= 0.15.1b"
)
if( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
set( curl_ssl "darwinssl" )
elseif( CMAKE_SYSTEM_NAME MATCHES "Windows" )
set( curl_ssl "schannel")
else()
set ( curl_ssl "openssl" )
endif ()
add_conan_lib(
ThreadPool
threadpool/20140926
REQUIRED
ALWAYS_ALLOW_CONAN_FALLBACK
)
if( ${_OPT}has_networking )
add_conan_lib(
CURL
libcurl/7.75.0
REQUIRED
OPTION_NAME curl
PKG_CONFIG "libcurl >= 7.68.0"
INTERFACE_NAME CURL::libcurl
FIND_PACKAGE_OPTIONS
CONAN_OPTIONS
libcurl:with_ssl=${curl_ssl}
libcurl:shared=True
)
endif()
if( NOT CMAKE_SYSTEM_NAME MATCHES "Darwin|Windows")
add_conan_lib(
libuuid
libuuid/1.0.3
REQUIRED
OPTION_NAME uuid
PKG_CONFIG "uuid"
INTERFACE_NAME libuuid::libuuid
)
endif()
2021-06-08 10:40:08 +00:00
add_conan_lib(
RapidJSON
rapidjson/1.1.0
REQUIRED
)
set_conan_vars_to_parent()
# Required libraries
#
# directory option symbol req chk version
addlib( libsndfile sndfile SNDFILE YES YES "sndfile >= 1.0.28" )
addlib( libsoxr soxr SOXR YES YES "soxr >= 0.1.1" )
addlib( portaudio-v19 portaudio PORTAUDIO YES YES "" )
2020-06-21 22:48:07 +00:00
addlib( sqlite sqlite SQLITE YES YES "sqlite3 >= 3.32.0" )
# Optional libraries
#
# directory option symbol req chk version
addlib( ffmpeg ffmpeg FFMPEG NO NO "libavcodec >= 51.53" "libavformat >= 52.12" "libavutil >= 52.66" )
addlib( libnyquist nyquist NYQUIST NO YES "" )
addlib( libvamp vamp VAMP NO YES "vamp >= 2.5" "vamp-hostsdk >= 2.5" )
addlib( libogg ogg LIBOGG NO YES "ogg >= 1.3.1" )
addlib( libvorbis vorbis LIBVORBIS NO YES "vorbis >= 1.3.3" "vorbisenc >= 1.3.3" "vorbisfile >= 1.3.3" )
addlib( libflac flac LIBFLAC NO YES "flac >= 1.3.1" "flac++ >= 1.3.1" )
addlib( lv2 lv2 LV2 NO YES "lilv-0 >= 0.24.6" "lv2 >= 1.16.0" "serd-0 >= 0.30.2" "sord-0 >= 0.16.4" "sratom-0 >= 0.6.4" "suil-0 >= 0.10.6" )
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
2020-02-11 07:15:26 +00:00
addlib( portmidi midi MIDI NO YES "portmidi >= 0.1" )
if (NOT USE_MIDI AND
"EXPERIMENTAL_MIDI_OUT" IN_LIST EXPERIMENTAL_OPTIONS_LIST )
message(FATAL_ERROR "EXPERIMENTAL_MIDI_OUT requires USE_MIDI")
endif ()
addlib( portmixer portmixer PORTMIXER NO YES "" )
if (NOT USE_PORTMIXER AND
"EXPERIMENTAL_AUTOMATED_INPUT_LEVEL_ADJUSTMENT" IN_LIST
EXPERIMENTAL_OPTIONS_LIST )
message(FATAL_ERROR "EXPERIMENTAL_AUTOMATED_INPUT_LEVEL_ADJUSTMENT requires USE_PORTMIXER")
endif ()
addlib( portsmf portsmf PORTSMF NO YES "portSMF >= 0.1" )
addlib( libsbsms sbsms SBSMS NO YES "sbsms >= 2.2.0" )
addlib( soundtouch soundtouch SOUNDTOUCH NO YES "soundtouch >= 1.7.1" )
addlib( twolame twolame LIBTWOLAME NO YES "twolame >= 0.3.13" )