mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-23 09:20:16 +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:
@@ -62,7 +62,7 @@ hold information about one contributor to Audacity.
|
||||
// RevisionIdent.h may contain #defines like these ones:
|
||||
//#define REV_LONG "28864acb238cb3ca71dda190a2d93242591dd80e"
|
||||
//#define REV_TIME "Sun Apr 12 12:40:22 2015 +0100"
|
||||
#include <RevisionIdent.h>
|
||||
#include "RevisionIdent.h"
|
||||
|
||||
#ifndef REV_TIME
|
||||
#define REV_TIME "unknown date and time"
|
||||
|
||||
@@ -21,12 +21,13 @@ if( GIT_FOUND )
|
||||
add_custom_target(
|
||||
version
|
||||
COMMAND
|
||||
${CMAKE_COMMAND} -D GIT=${GIT_EXECUTABLE}
|
||||
-D _PRVDIR=${_PRVDIR}
|
||||
-P ${CMAKE_MODULE_PATH}/Version.cmake
|
||||
${CMAKE_COMMAND} -D GIT="${GIT_EXECUTABLE}"
|
||||
-D "_PRVDIR=${_PRVDIR}"
|
||||
-P "${AUDACITY_MODULE_PATH}/Version.cmake"
|
||||
WORKING_DIRECTORY
|
||||
${topdir}
|
||||
)
|
||||
|
||||
add_dependencies( ${TARGET} version )
|
||||
endif()
|
||||
|
||||
@@ -40,6 +41,17 @@ if( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
|
||||
set( USE_AUDIO_UNITS ${${_OPT}use_audio_units} CACHE INTERNAL "" )
|
||||
endif()
|
||||
|
||||
# Detect, which version of FileDialog to use for
|
||||
# We always assume that GTK is used on platforms other than Windows and macOS,
|
||||
# as there is no other implementation avalaible now
|
||||
if( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
|
||||
set( wxIS_MAC on )
|
||||
elseif( CMAKE_SYSTEM_NAME MATCHES "Windows" )
|
||||
set ( wxIS_WIN on )
|
||||
else()
|
||||
set ( wxIS_GTK on)
|
||||
endif()
|
||||
|
||||
# Handle Ladspa option
|
||||
cmd_option(
|
||||
${_OPT}use_ladspa
|
||||
@@ -1054,17 +1066,18 @@ list( APPEND LDFLAGS
|
||||
list( APPEND LIBRARIES
|
||||
PUBLIC
|
||||
${CMAKE_REQUIRED_LIBRARIES}
|
||||
wxWidgets
|
||||
expat
|
||||
lame
|
||||
ZLIB::ZLIB
|
||||
wxwidgets::wxwidgets
|
||||
expat::expat
|
||||
libmp3lame::libmp3lame
|
||||
libsndfile
|
||||
libsoxr
|
||||
portaudio-v19
|
||||
sqlite
|
||||
$<$<BOOL:${USE_FFMPEG}>:ffmpeg>
|
||||
$<$<BOOL:${USE_LIBID3TAG}>:libid3tag>
|
||||
$<$<BOOL:${USE_LIBID3TAG}>:libid3tag::libid3tag>
|
||||
$<$<BOOL:${USE_LIBFLAC}>:libflac>
|
||||
$<$<BOOL:${USE_LIBMAD}>:libmad>
|
||||
$<$<BOOL:${USE_LIBMAD}>:libmad::libmad>
|
||||
$<$<BOOL:${USE_LIBOGG}>:libogg>
|
||||
$<$<BOOL:${USE_LIBVORBIS}>:libvorbis>
|
||||
$<$<BOOL:${USE_LIBTWOLAME}>:twolame>
|
||||
@@ -1115,15 +1128,9 @@ if( CMAKE_SYSTEM_NAME MATCHES "Windows" )
|
||||
)
|
||||
|
||||
# Copy over the wxWidgets DLLs
|
||||
if( ${_OPT}use_wxwidgets STREQUAL "system" )
|
||||
set( wxlibs "$ENV{WXWIN}" )
|
||||
else()
|
||||
set( wxlibs "${CMAKE_BINARY_DIR}" )
|
||||
endif()
|
||||
|
||||
# Convert the paths to native
|
||||
file( TO_NATIVE_PATH "${_INTDIR}/dlls" dlls )
|
||||
file( TO_NATIVE_PATH "${wxWidgets_LIB_DIR}" libdir )
|
||||
file( TO_NATIVE_PATH "${CMAKE_BINARY_DIR}/bin/shared" libdir )
|
||||
file( TO_NATIVE_PATH "${_EXEDIR}" exedir )
|
||||
|
||||
# Copy the required wxWidgets libs into the bundle
|
||||
@@ -1133,8 +1140,8 @@ if( CMAKE_SYSTEM_NAME MATCHES "Windows" )
|
||||
COMMAND
|
||||
${CMAKE_COMMAND} -D SRC="${_EXEDIR}/Audacity.exe"
|
||||
-D DST="${_EXEDIR}"
|
||||
-D WXWIN="${libdir}"
|
||||
-P ${CMAKE_MODULE_PATH}/CopyLibs.cmake
|
||||
-D WXWIN="${libdir}/$<CONFIG>/"
|
||||
-P ${AUDACITY_MODULE_PATH}/CopyLibs.cmake
|
||||
POST_BUILD
|
||||
)
|
||||
|
||||
@@ -1218,7 +1225,8 @@ elseif( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
|
||||
COMMAND
|
||||
${CMAKE_COMMAND} -D SRC="${_EXEDIR}/Audacity"
|
||||
-D DST="${_PKGLIB}"
|
||||
-P ${CMAKE_MODULE_PATH}/CopyLibs.cmake
|
||||
-D WXWIN="${CMAKE_BINARY_DIR}/lib/shared/$<CONFIG>"
|
||||
-P ${AUDACITY_MODULE_PATH}/CopyLibs.cmake
|
||||
POST_BUILD
|
||||
)
|
||||
|
||||
@@ -1283,8 +1291,8 @@ else()
|
||||
COMMAND
|
||||
${CMAKE_COMMAND} -D SRC="${_EXEDIR}/audacity"
|
||||
-D DST="${_DEST}/${_PKGLIB}"
|
||||
-D WXWIN="${WXWIN}"
|
||||
-P ${CMAKE_MODULE_PATH}/CopyLibs.cmake
|
||||
-D WXWIN="${CMAKE_BINARY_DIR}/lib/shared/$<CONFIG>"
|
||||
-P ${AUDACITY_MODULE_PATH}/CopyLibs.cmake
|
||||
POST_BUILD
|
||||
)
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user