From 53840f7a3e02d537a790702c44d0240721582df6 Mon Sep 17 00:00:00 2001 From: Leland Lucius Date: Wed, 19 Feb 2020 10:53:50 -0600 Subject: [PATCH] Various fixes to CMake build Mostly a result of not defining __WXMSW__, but the portmixer cmakelist wasn't looking for the right portaudio variables. --- cmake-proxies/CMakeLists.txt | 2 +- cmake-proxies/ffmpeg/CMakeLists.txt | 2 +- cmake-proxies/portmixer/CMakeLists.txt | 24 ++++++++++++------------ cmake-proxies/wxWidgets/CMakeLists.txt | 1 + src/CMakeLists.txt | 13 ++++++------- src/audacity_config.h.in | 3 --- 6 files changed, 21 insertions(+), 24 deletions(-) diff --git a/cmake-proxies/CMakeLists.txt b/cmake-proxies/CMakeLists.txt index 25b431869..62384cb10 100644 --- a/cmake-proxies/CMakeLists.txt +++ b/cmake-proxies/CMakeLists.txt @@ -163,7 +163,7 @@ addlib( libid3tag id3tag LIBID3TAG NO YES "id3tag >= 0.15.1 addlib( libmad mad LIBMAD NO YES "mad >= 2.3" ) addlib( libnyquist nyquist NYQUIST NO YES "" ) addlib( libvamp vamp VAMP NO YES "vamp >= 2.5" "vamp-hostsdk >= 2.5" ) -addlib( libogg ogg LIBVORBIS NO YES "ogg >= 1.3.1" ) +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" ) diff --git a/cmake-proxies/ffmpeg/CMakeLists.txt b/cmake-proxies/ffmpeg/CMakeLists.txt index 0d387d35e..c18192487 100644 --- a/cmake-proxies/ffmpeg/CMakeLists.txt +++ b/cmake-proxies/ffmpeg/CMakeLists.txt @@ -29,7 +29,7 @@ if( ${_OPT}use_ffmpeg STREQUAL "off" ) message( STATUS "Disabling '${name}' library" ) else() # Let the Audacity target know that this library will be used. - set( USE_${symbol} ON CACHE INTERNAL USE_${symbol} ) + set( USE_${symbol} ON CACHE INTERNAL "" ) # Only need to look up the package if we're linking to it set( isdyn YES ) diff --git a/cmake-proxies/portmixer/CMakeLists.txt b/cmake-proxies/portmixer/CMakeLists.txt index b613acc17..2deaa045e 100644 --- a/cmake-proxies/portmixer/CMakeLists.txt +++ b/cmake-proxies/portmixer/CMakeLists.txt @@ -10,28 +10,28 @@ list( APPEND SOURCES ${TARGET_ROOT}/src/px_win_common.c > - $<$: + $<$: ${TARGET_ROOT}/src/px_win_ds.c > - $<$: + $<$: ${TARGET_ROOT}/src/px_win_wasapi.c ${TARGET_ROOT}/src/px_win_endpoint.c > - $<$: + $<$: ${TARGET_ROOT}/src/px_win_wmme.c > - $<$: + $<$: ${TARGET_ROOT}/src/px_mac_coreaudio.c > - $<$: + $<$: ${TARGET_ROOT}/src/px_linux_alsa.c > - $<$: + $<$: ${TARGET_ROOT}/src/px_unix_oss.c > ) @@ -45,27 +45,27 @@ list( APPEND INCLUDES list( APPEND DEFINES PRIVATE - $<$: + $<$: PX_USE_WIN_DSOUND=1 > - $<$: + $<$: PX_USE_WIN_WASAPI=1 > - $<$: + $<$: PX_USE_WIN_MME=1 > - $<$: + $<$: PX_USE_MAC_COREAUDIO=1 > - $<$: + $<$: PX_USE_LINUX_ALSA=1 > - $<$: + $<$: PX_USE_UNIX_OSS=1 > ) diff --git a/cmake-proxies/wxWidgets/CMakeLists.txt b/cmake-proxies/wxWidgets/CMakeLists.txt index 3c80ee24b..92253cc41 100644 --- a/cmake-proxies/wxWidgets/CMakeLists.txt +++ b/cmake-proxies/wxWidgets/CMakeLists.txt @@ -167,6 +167,7 @@ elseif( "${toolkit}" MATCHES ".*gtk4.*" ) elseif( "${toolkit}" MATCHES ".*msw.*" ) set( wxTOOLKIT "MSW" CACHE INTERNAL "" ) set( wxIS_WIN YES CACHE INTERNAL "" ) + list( APPEND DEFINES __WXMSW__=1 ) elseif( "${toolkit}" MATCHES ".*osx.*" ) set( wxTOOLKIT "MAC" CACHE INTERNAL "" ) set( wxIS_MAC YES CACHE INTERNAL "" ) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 067d2eb37..e3dba4dd7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -578,7 +578,7 @@ list( APPEND SOURCES export/ExportMP2.cpp > - $<$: + $<$,$>: export/ExportOGG.cpp > @@ -627,7 +627,7 @@ list( APPEND SOURCES import/ImportMP3.cpp > - $<$: + $<$,$>: import/ImportOGG.cpp > @@ -1043,7 +1043,7 @@ list( APPEND LIBRARIES $<$:libflac> $<$:libmad> - $<$:libogg> + $<$:libogg> $<$:libvorbis> # $<$:libvorbis> # $<$:libvorbisenc> @@ -1085,7 +1085,7 @@ cmd_option( "Use VST2 plug-in support [on, off]" ON ) -set( USE_VST ${${_OPT}enable_vst} ) +set( USE_VST ${${_OPT}use_vst} ) set( AUDACITY_NAME "Audacity" ) set( BUILDING_AUDACITY 1 ) @@ -1181,11 +1181,10 @@ elseif( CMAKE_SYSTEM_NAME MATCHES "Darwin" ) # Handle Audio Units option cmd_option( - ${_OPT}enable_audiounits + ${_OPT}use_audiounits "Enable Audio Unit plug-in support" ON ) - set( USE_AUDIO_UNITS ${${_OPT}enable_audiounits} ) set_target_properties( ${TARGET} @@ -1297,7 +1296,7 @@ elseif( CMAKE_SYSTEM_NAME MATCHES "Linux|FreeBSD" ) audio/x-aiff audio/x-wav > - $<$>: + $<$,$>: application/ogg audio/x-vorbis+ogg > diff --git a/src/audacity_config.h.in b/src/audacity_config.h.in index b4c28f797..49d1c3167 100755 --- a/src/audacity_config.h.in +++ b/src/audacity_config.h.in @@ -81,9 +81,6 @@ /* Define if Nyquist support should be enabled */ #cmakedefine USE_NYQUIST 1 -/* Define if midi support should be enabled */ -#cmakedefine USE_PORTMIDI 1 - /* Define if PortMixer support should be enabled */ #cmakedefine USE_PORTMIXER 1