mirror of
https://github.com/cookiengineer/audacity
synced 2026-01-23 17:25:54 +01:00
Add the first Conan-based dependecies
add_conan_lib cmake function is defined, that allows to add a dependency using Conan with two possible system fallbacks: 1. pkg_check_modules is invoked, if `PGK_CONFIG ...` is present 2. find_package is invoked if `FIND_PACKAGE_OPTIONS` is present and `pkg_check_modules` has failed If `ALWAYS_ALLOW_CONAN_FALLBACK` is present - `obey_system_dependencies` will be ignored for the package Currently, the following dependencies are retrieved using Conan: * zlib * expat * wxwidgets * libmp3lame * libid3tag * libmad The last three libraries are included in this commit, as they depend on zlib. Properly pass **arch** and **os.version** to Conan
This commit is contained in:
@@ -1,22 +1,96 @@
|
||||
# Allow user to globally set the library preference
|
||||
cmd_option( ${_OPT}lib_preference
|
||||
"Library preference [system (if available), local]"
|
||||
"system"
|
||||
STRINGS "system" "local"
|
||||
add_conan_lib(
|
||||
ZLIB
|
||||
zlib/1.2.11
|
||||
REQUIRED
|
||||
PGK_CONFIG "zlib >= 1.2.11"
|
||||
INTERFACE_NAME ZLIB::ZLIB
|
||||
OPTION_NAME zlib
|
||||
CONAN_OPTIONS
|
||||
zlib:shared=True
|
||||
)
|
||||
|
||||
# Special mode, that will force dependencies to the packages provided by system unless they were set to local explicitly.
|
||||
cmd_option( ${_OPT}obey_system_dependencies
|
||||
"Use system packages to satisfy dependencies"
|
||||
Off
|
||||
add_conan_lib(
|
||||
expat
|
||||
expat/2.2.9
|
||||
REQUIRED
|
||||
PGK_CONFIG "expat >= 2.1.0"
|
||||
CONAN_OPTIONS
|
||||
expat:shared=True
|
||||
)
|
||||
|
||||
set(wx_zlib "zlib")
|
||||
set(wx_png "libpng")
|
||||
|
||||
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
|
||||
set(wx_png "sys")
|
||||
endif()
|
||||
|
||||
set(wx_expat "expat")
|
||||
|
||||
if (${_OPT}use_expat STREQUAL "system")
|
||||
set(wx_expat "sys")
|
||||
endif()
|
||||
|
||||
add_conan_lib(
|
||||
wxWidgets
|
||||
wxwidgets/3.1.3-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:tiff=off
|
||||
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
|
||||
)
|
||||
|
||||
add_conan_lib(
|
||||
libmp3lame
|
||||
libmp3lame/3.100
|
||||
REQUIRED
|
||||
INTERFACE_NAME libmp3lame::libmp3lame
|
||||
PGK_CONFIG "lame >= 3.100"
|
||||
)
|
||||
|
||||
add_conan_lib(
|
||||
libid3tag
|
||||
libid3tag/0.15.1b
|
||||
OPTION_NAME id3tag
|
||||
HAS_ONLY_DEBUG_RELEASE
|
||||
PGK_CONFIG "id3tag >= 0.15.1b"
|
||||
)
|
||||
|
||||
add_conan_lib(
|
||||
libmad
|
||||
libmad/0.15.1b
|
||||
OPTION_NAME mad
|
||||
HAS_ONLY_DEBUG_RELEASE
|
||||
PGK_CONFIG "mad >= 0.15.1b"
|
||||
)
|
||||
|
||||
set_conan_vars_to_parent()
|
||||
|
||||
# Required libraries
|
||||
#
|
||||
# directory option symbol req chk version
|
||||
addlib( wxWidgets wxwidgets WX YES NO "" ) # must be first
|
||||
addlib( expat expat EXPAT YES YES "expat >= 2.1.0" )
|
||||
addlib( lame lame LAME YES YES "lame >= 3.100" )
|
||||
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 "" )
|
||||
@@ -26,8 +100,6 @@ addlib( sqlite sqlite SQLITE YES YES "sqlite3 >= 3.32.
|
||||
#
|
||||
# directory option symbol req chk version
|
||||
addlib( ffmpeg ffmpeg FFMPEG NO NO "libavcodec >= 51.53" "libavformat >= 52.12" "libavutil >= 52.66" )
|
||||
addlib( libid3tag id3tag LIBID3TAG NO YES "id3tag >= 0.15.1b" )
|
||||
addlib( libmad mad LIBMAD NO YES "mad >= 0.15.1b" )
|
||||
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" )
|
||||
@@ -53,4 +125,3 @@ 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" )
|
||||
|
||||
|
||||
Reference in New Issue
Block a user