1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-11 09:03:36 +02:00

Adds an environment to check, how well Linux builds with system packages

A special mode `audacity_obey_system_dependencies` is added, so the build will fail if we could not build against a system package for some reason. 

The following packages are marked for the local build now:

* **wxWidgets**: Ubuntu lacks support for 3.1.3. We can't build against 3.0 branch.
* **portaudio**: there are issues, that prevent using a system version of portaudio.
* **sqlite3**: Ubuntu package is very dated; we care about the performance and stability.
* **nyquist**: Ubuntu has no package available.
* **vamp**: Ubuntu has no development package available.
* **portmixer**: Ubuntu has no package available.
* **sbsms**: Ubuntu package is very dated; we care about the performance and stability.

We use docker to create a clean build environment. Currently, `pkg-config` is used to locate the system libraries. There are few issues with `pkg-config` on Ubuntu:

* It does not work with `lame` and `portmidi`.
* The packaged files for `id3tag` and `mad` have wrong version.
We fix such cases by copying the 
into `/usr/local/lib`.
This commit is contained in:
Dmitry Vedenko
2021-05-17 19:13:12 +03:00
committed by Dmitry Vedenko
parent 90903d237a
commit 9c8185545d
8 changed files with 164 additions and 0 deletions

View File

@@ -5,6 +5,12 @@ cmd_option( ${_OPT}lib_preference
STRINGS "system" "local"
)
# 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
)
# Required libraries
#
# directory option symbol req chk version

View File

@@ -574,6 +574,7 @@ function( addlib dir name symbol required check )
if( ${use} STREQUAL "system" )
# Look them up
pkg_check_modules( PKG_${TARGET} ${packages} )
if( PKG_${TARGET}_FOUND )
message( STATUS "Using '${name}' system library" )
@@ -586,6 +587,8 @@ function( addlib dir name symbol required check )
# And add it to our target
target_include_directories( ${TARGET} INTERFACE ${INCLUDES} )
target_link_libraries( ${TARGET} INTERFACE ${LIBRARIES} )
elseif( ${_OPT}obey_system_dependencies )
message( FATAL_ERROR "Failed to find the system package ${name}" )
else()
set( ${use} "local" )
set_property( CACHE ${use} PROPERTY VALUE "local" )