Browse Source

Various cmake changes

Mostly from suggestions, but there's a couple of other minor
fixes and additions:

   Cmake not decides with SDK to use on Windows

   All Audacity cmake options are not prefixed with "audacity_", but this
   is configurable in audacity/CMakeLists.txt

   Several other options have been marked advanced so they don't clutter
   the CMake GUI

   On Windows, multiple processors will now be used reducing build time
   considerably

   Quieted a couple of package messages that the user doesn't need to see

   No longer tried to create aliases on Windows

   No longer used precompiled headers if ccache is available

   On Windows, only copies the needed wxWidgets and VC runtime libraries
   to the bin directory
au-ny-api
Leland Lucius 2 years ago
parent
commit
e79274a403
  1. 60
      CMakeLists.txt
  2. 8
      cmake-proxies/CMakeLists.txt
  3. 2
      cmake-proxies/expat/CMakeLists.txt
  4. 8
      cmake-proxies/ffmpeg/CMakeLists.txt
  5. 30
      cmake-proxies/lv2/CMakeLists.txt
  6. 78
      cmake-proxies/portaudio-v19/CMakeLists.txt
  7. 6
      cmake-proxies/wxWidgets/CMakeLists.txt
  8. 3
      locale/CMakeLists.txt
  9. 63
      src/CMakeLists.txt

60
CMakeLists.txt

@ -29,28 +29,25 @@ cmake_policy( SET CMP0072 NEW )
cmake_policy( SET CMP0075 NEW )
if( WIN32 )
# The NuGet packages that the Windows build requires
# (Only here for visibility)
set( GETTEXT_NAME "Gettext.Tools" )
set( GETTEXT_VERSION "0.20.1.1" )
set( PYTHON_NAME "python2" )
set( PYTHON_VERSION "2.7.17" )
# Define the SDK version we require
set( CMAKE_SYSTEM_VERSION "10.0.17763.0" CACHE INTERNAL "" )
elseif( APPLE )
# Define the OSX compatibility parameters
set( CMAKE_OSX_ARCHITECTURES x86_64 CACHE INTERNAL "" )
set( CMAKE_OSX_DEPLOYMENT_TARGET 10.7 CACHE INTERNAL "" )
set( CMAKE_OSX_SYSROOT macosx CACHE INTERNAL "" )
# A bit of a no-no, but couldn't figure out a better way to make it GLOBAL
set( CMAKE_CXX_FLAGS "-stdlib=libc++" )
# Shouldn't cmake do this???
string( APPEND CMAKE_CXX_FLAGS " -stdlib=libc++" )
endif()
# Define option() prefix
set( _OPT "audacity_" )
# Add our module path
set( CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake-proxies/cmake-modules)
@ -59,14 +56,16 @@ set( CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake-proxies/cmake-modules)
#set( CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE ON )
#set( CMAKE_INTERPROCEDURAL_OPTIMIZATION_DEBUG OFF )
# Set the required C++ stardard
# Set the required C++ standard
set( CMAKE_CXX_STANDARD 14 )
set( CMAKE_CXX_STANDARD_REQUIRED ON )
# Use ccache if available
find_program( CCACHE_PROGRAM ccache )
mark_as_advanced( FORCE CCACHE_PROGRAM )
if( CCACHE_PROGRAM )
set_property( GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}" )
set_property( GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}" )
endif()
# Our very own project
@ -88,12 +87,26 @@ include( TestBigEndian )
# Organize subdirectories/targets into folders for the IDEs
set_property( GLOBAL PROPERTY USE_FOLDERS ON )
# Make sure Audacity is the startup project on Windows
if( CMAKE_GENERATOR MATCHES "Visual Studio" )
# Make sure Audacity is the startup project
set_directory_properties(
PROPERTIES
VS_STARTUP_PROJECT "${CMAKE_PROJECT_NAME}"
)
# Build using multiple processors
foreach( config ${CMAKE_CONFIGURATION_TYPES} )
string( TOUPPER "${config}" config )
string( APPEND CMAKE_C_FLAGS_${config} " /MP" )
string( APPEND CMAKE_CXX_FLAGS_${config} " /MP" )
endforeach()
# Define system library information, but we'll do the install
set( CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP YES )
set( CMAKE_INSTALL_UCRT_LIBRARIES NO )
set( CMAKE_INSTALL_MFC_LIBRARIES NO )
set( CMAKE_INSTALL_OPENMP_LIBRARIES NO )
include( InstallRequiredSystemLibraries )
endif()
# Where the final product is stored
@ -127,6 +140,9 @@ endif()
# Add the dynamic linker library (if needed) to the list of required libraries
list( APPEND CMAKE_REQUIRED_LIBRARIES ${CMAKE_DL_LIBS} )
# Make sure they're used during the link steps
set( CMAKE_LINK_INTERFACE_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} )
# May be a misconfiguration in my system, but CMake doesn't want to look
# in /usr/local/lib by default...so force the issue
if( CMAKE_SYSTEM_NAME MATCHES "FreeBSD" )
@ -135,13 +151,10 @@ if( CMAKE_SYSTEM_NAME MATCHES "FreeBSD" )
list( APPEND CMAKE_SHARED_LINKER_FLAGS -L/usr/local/lib )
endif()
# Make sure they're used during the link steps
set( CMAKE_LINK_INTERFACE_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES} )
# Various common checks whose results are used by the various targets
# Various common checks whose results are used by the different targets
test_big_endian( WORDS_BIGENDIAN )
# Check for various compiler flags
# Check for compiler flags
if( CMAKE_CXX_COMPILER_ID MATCHES "AppleClang|Clang|GNU" )
check_cxx_compiler_flag( "-mmmx" HAVE_MMX )
if( HAVE_MMX )
@ -239,10 +252,10 @@ check_type_size( "wchar_t" SIZEOF_WCHAR LANGUAGE C )
check_type_size( "void*" SIZEOF_POINTER LANGUAGE C )
# We'll be using it if it's available
find_package( PkgConfig )
find_package( PkgConfig QUIET )
# Mostly just to make the CMP0072 policy happy
find_package( OpenGL )
find_package( OpenGL QUIET )
# When called will define several useful directory paths for the
# current context.
@ -265,9 +278,10 @@ endmacro()
# So, in either case we end up with what we want:
# .../bin/Debug//
# or:
# .../bin/./Debug
# .../bin//Debug
set( _DEST "${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/${CMAKE_CFG_INTDIR}/${CMAKE_BUILD_TYPE}" )
set( _EXEDIR "${_DEST}" )
string( REGEX REPLACE "/+$" "" _EXEDIR "${_EXEDIR}" )
# Adjust them for the Mac
if( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
@ -286,7 +300,9 @@ if( NOT EXISTS "${CMAKE_BINARY_DIR}/lib" )
file( MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/lib" )
endif()
if( NOT EXISTS "${CMAKE_BINARY_DIR}/lib64" )
# Only create on systems that need it, effectively excluding Windows where links
# may not work due to insufficient privileges
if( NOT CMAKE_INSTALL_LIBDIR STREQUAL "lib" AND NOT EXISTS "${CMAKE_BINARY_DIR}/lib64" )
file( CREATE_LINK "${CMAKE_BINARY_DIR}/lib" "${CMAKE_BINARY_DIR}/lib64" SYMBOLIC )
endif()
@ -379,11 +395,11 @@ add_subdirectory( "cmake-proxies/mod-script-pipe" )
#[[
get_cmake_property(_variableNames VARIABLES)
foreach (_variableName ${_variableNames})
message(STATUS "${_variableName}=${${_variableName}}")
message(STATUS "${_variableName}=${${_variableName}}")
endforeach()
#]]
#[[
include(PrintProperties)
print_properties(TARGET "Audacity")
print_properties(TARGET "wxWidgets")
#]]

8
cmake-proxies/CMakeLists.txt

@ -1,6 +1,6 @@
# Allow user to globally set the system library preference
option( prefer_system_libs "Use system libraries if available" YES )
option( ${_OPT}prefer_system_libs "Use system libraries if available" YES )
#
# Add individual library targets
@ -33,7 +33,7 @@ function( addlib dir name symbol required check )
# If the target is required, then it's always enabled. Otherwise,
# give the user the option to enable/disable it.
set( enable enable_${name} )
set( enable ${_OPT}enable_${name} )
if( required )
set( ${enable} YES )
else()
@ -59,9 +59,9 @@ function( addlib dir name symbol required check )
# Only present the system library option if pkg-config was found and
# a package has been specified. Otherwise, the local library will
# be used unconditionally.
set( system use_system_${name} )
set( system ${_OPT}use_system_${name} )
if( PkgConfig_FOUND AND packages )
option( ${system} "Use ${name} system library if available" ${prefer_system_libs} )
option( ${system} "Use ${name} system library if available" ${${_OPT}prefer_system_libs} )
else()
set( ${system} NO )
endif()

2
cmake-proxies/expat/CMakeLists.txt

@ -22,6 +22,8 @@ list( APPEND INCLUDES
list( APPEND DEFINES
PRIVATE
HAVE_EXPAT_CONFIG_H
PUBLIC
XML_STATIC
)
if( WORDS_BIGENDIAN )

8
cmake-proxies/ffmpeg/CMakeLists.txt

@ -15,19 +15,19 @@ message( STATUS "========== Configuring ${name} ==========" )
set( USE_${symbol} ON CACHE INTERNAL USE_${symbol} )
# Add the system/local option
option( use_system_${name} "Use ${name} system library if available" ${prefer_system_libs} )
option( ${_OPT}use_system_${name} "Use ${name} system library if available" ${${_OPT}prefer_system_libs} )
# Look up the system packages if the user wants them
if( use_system_${name} )
if( ${_OPT}use_system_${name} )
# Provide an option that determines if the libraries are loaded
# dynamically at run time or statically linked at build time
option( disable_dynamic_${name} "Disable dynamic loading of ${name} libraries" NO)
option( ${_OPT}disable_dynamic_${name} "Disable dynamic loading of ${name} libraries" NO)
# Look them up
pkg_check_modules( ${TARGET} ${packages} )
else()
# Make sure to reset in case user reconfigures between local/system
set( disable_dynamic_${name} NO CACHE INTERNAL "" )
set( ${_OPT}disable_dynamic_${name} NO CACHE INTERNAL "" )
endif()
# If the system packages were found

30
cmake-proxies/lv2/CMakeLists.txt

@ -121,30 +121,12 @@ set( dst "${_PUBDIR}" )
set( ns "${dst}/lv2/lv2plug.in/ns" )
set( stamp "${_INTDIR}/.stamp.lv2" )
execute_process(
COMMAND
"${CMAKE_COMMAND}" -E make_directory "${ns}"
)
execute_process(
COMMAND
"${CMAKE_COMMAND}" -E create_symlink "${src}/lv2/core/lv2.h" "${dst}/lv2.h"
)
execute_process(
COMMAND
"${CMAKE_COMMAND}" -E create_symlink "${src}/lv2" "${ns}/ext"
)
execute_process(
COMMAND
"${CMAKE_COMMAND}" -E create_symlink "${src}/lv2" "${ns}/extensions"
)
execute_process(
COMMAND
"${CMAKE_COMMAND}" -E create_symlink "${src}/lv2/core" "${ns}/lv2core"
)
# Simulate the older directory structure (trailing "/" is important)
file( MAKE_DIRECTORY "${ns}" )
file( COPY "${src}/lv2/core/lv2.h" DESTINATION "${dst}/lv2.h" )
file( COPY "${src}/lv2/" DESTINATION "${ns}/ext" )
file( COPY "${src}/lv2/" DESTINATION "${ns}/extensions" )
file( COPY "${src}/lv2/core/" DESTINATION "${ns}/lv2core" )
set( LILV_VERSION "0.24.4" )
set( SERD_VERSION "0.30.2" )

78
cmake-proxies/portaudio-v19/CMakeLists.txt

@ -7,54 +7,58 @@ set( CMAKE_MODULE_PATH ${TARGET_ROOT}/cmake_support )
# Define the platform specific interface options
if( CMAKE_SYSTEM_NAME MATCHES "Windows" )
option( use_pa_ds "Enable the portaudio DirectSound interface if available" YES )
option( use_pa_wasapi "Enable the portaudio WASAPI interface if available" YES )
option( use_pa_wmme "Enable the portaudio WMME interface if available" YES )
option( ${_OPT}use_pa_ds "Enable the portaudio DirectSound interface if available" YES )
option( ${_OPT}use_pa_wasapi "Enable the portaudio WASAPI interface if available" YES )
option( ${_OPT}use_pa_wmme "Enable the portaudio WMME interface if available" YES )
elseif( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
option( use_pa_coreaudio "Enable the portaudio CoreAudio interface if available" YES )
option( ${_OPT}use_pa_coreaudio "Enable the portaudio CoreAudio interface if available" YES )
elseif( CMAKE_SYSTEM_NAME MATCHES "Linux|FreeBSD" )
option( use_pa_alsa "Enable the portaudio ALSA interface if available" YES )
if( use_pa_alsa )
option( ${_OPT}use_pa_alsa "Enable the portaudio ALSA interface if available" YES )
if( ${_OPT}use_pa_alsa )
find_package( ALSA )
if( NOT ALSA_FOUND )
set( use_pa_alsa NO CACHE INTERNAL "" )
set( ${_OPT}use_pa_alsa NO CACHE INTERNAL "" )
endif()
endif()
endif()
# Look for OSS if the user wants it
option( use_pa_oss "Use the OSS audio interface if available" YES )
if( use_pa_oss )
option( ${_OPT}use_pa_oss "Use the OSS audio interface if available" YES )
if( ${_OPT}use_pa_oss )
find_path( OSS_INCLUDE NAMES sys/soundcard.h )
mark_as_advanced( FORCE OSS_INCLUDE )
if( OSS_INCLUDE )
set( OSS_INCLUDE_DIRS ${OSS_INCLUDE} )
endif()
find_library( OSS_LIBRARY NAMES ossaudio )
mark_as_advanced( FORCE OSS_LIBRARY )
if( OSS_LIBRARY )
set( OSS_LIBRARIES ${OSS_LIBRARY} )
endif()
if( NOT OSS_INCLUDE_DIRS )
set( use_pa_oss NO CACHE INTERNAL "" )
set( ${_OPT}use_pa_oss NO CACHE INTERNAL "" )
endif()
endif()
# Look for JACK if the user wants it
option( use_pa_jack "Use the JACK audio interface if available" YES )
if( use_pa_jack )
option( ${_OPT}use_pa_jack "Use the JACK audio interface if available" YES )
if( ${_OPT}use_pa_jack )
# Provide an option that determines if the libraries are loaded
# dynamically at run time or statically linked at build time
option( disable_dynamic_jack "Disable dynamic loading of JACK libraries" YES )
option( ${_OPT}disable_dynamic_jack "Disable dynamic loading of JACK libraries" YES )
# Find it
find_package( Jack )
if( NOT JACK_FOUND)
set( use_pa_jack NO CACHE INTERNAL "" )
set( ${_OPT}use_pa_jack NO CACHE INTERNAL "" )
endif()
else()
# Make sure to reset in case user reconfigures later
set( disable_dynamic_jack NO CACHE INTERNAL "" )
set( ${_OPT}disable_dynamic_jack NO CACHE INTERNAL "" )
endif()
list( APPEND SOURCES
@ -91,28 +95,28 @@ list( APPEND SOURCES
${TARGET_ROOT}/src/os/unix/pa_unix_util.c
>
$<$<BOOL:${use_pa_ds}>:
$<$<BOOL:${${_OPT}use_pa_ds}>:
${TARGET_ROOT}/src/hostapi/dsound/pa_win_ds.c
${TARGET_ROOT}/src/hostapi/dsound/pa_win_ds_dynlink.c
>
$<$<BOOL:${use_pa_wasapi}>:
$<$<BOOL:${${_OPT}use_pa_wasapi}>:
${TARGET_ROOT}/src/hostapi/wasapi/pa_win_wasapi.c
>
$<$<BOOL:${use_pa_wmme}>:
$<$<BOOL:${${_OPT}use_pa_wmme}>:
${TARGET_ROOT}/src/hostapi/wmme/pa_win_wmme.c
>
$<$<BOOL:${use_pa_alsa}>:
$<$<BOOL:${${_OPT}use_pa_alsa}>:
${TARGET_ROOT}/src/hostapi/alsa/pa_linux_alsa.c
>
$<$<BOOL:${use_pa_oss}>:
$<$<BOOL:${${_OPT}use_pa_oss}>:
${TARGET_ROOT}/src/hostapi/oss/pa_unix_oss.c
>
$<$<BOOL:${use_pa_jack}>:
$<$<BOOL:${${_OPT}use_pa_jack}>:
${TARGET_ROOT}/src/hostapi/jack/pa_jack.c
${TARGET_ROOT}/src/hostapi/jack/pa_jack_dynload.c
>
@ -130,23 +134,23 @@ list( APPEND INCLUDES
${TARGET_ROOT}/src/os/unix
>
$<$<BOOL:${use_pa_ds}>:
$<$<BOOL:${${_OPT}use_pa_ds}>:
${TARGET_ROOT}/src/hostapi/dsound
>
$<$<BOOL:${use_pa_coreaudio}>:
$<$<BOOL:${${_OPT}use_pa_coreaudio}>:
${TARGET_ROOT}/src/hostapi/coreaudio
>
$<$<BOOL:${use_pa_alsa}>:
$<$<BOOL:${${_OPT}use_pa_alsa}>:
${ALSA_INCLUDE_DIRS}
>
$<$<BOOL:${use_pa_oss}>:
$<$<BOOL:${${_OPT}use_pa_oss}>:
${OSS_INCLUDE_DIRS}
>
$<$<BOOL:${use_pa_jack}>:
$<$<BOOL:${${_OPT}use_pa_jack}>:
${TARGET_ROOT}/src/hostapi/jack
${JACK_INCLUDE_DIRS}
>
@ -157,51 +161,51 @@ list( APPEND INCLUDES
list( APPEND DEFINES
PUBLIC
$<$<BOOL:${use_pa_ds}>:
$<$<BOOL:${${_OPT}use_pa_ds}>:
PA_USE_DS=1
>
$<$<BOOL:${use_pa_wasapi}>:
$<$<BOOL:${${_OPT}use_pa_wasapi}>:
PA_USE_WASAPI=1
>
$<$<BOOL:${use_pa_wmme}>:
$<$<BOOL:${${_OPT}use_pa_wmme}>:
PA_USE_WMME=1
>
$<$<BOOL:${use_pa_coreaudio}>:
$<$<BOOL:${${_OPT}use_pa_coreaudio}>:
PA_USE_COREAUDIO=1
>
$<$<BOOL:${use_pa_alsa}>:
$<$<BOOL:${${_OPT}use_pa_alsa}>:
PA_USE_ALSA=1
>
$<$<BOOL:${use_pa_oss}>:
$<$<BOOL:${${_OPT}use_pa_oss}>:
PA_USE_OSS=1
HAVE_SYS_SOUNDCARD_H=1
>
$<$<BOOL:${use_pa_jack}>:
$<$<BOOL:${${_OPT}use_pa_jack}>:
PA_USE_JACK=1
>
$<$<NOT:$<BOOL:${disable_dynamic_jack}>>:
$<$<NOT:$<BOOL:${${_OPT}disable_dynamic_jack}>>:
PA_DYNAMIC_JACK=1
>
)
list( APPEND LIBRARIES
INTERFACE
$<$<BOOL:${use_pa_alsa}>:
$<$<BOOL:${${_OPT}use_pa_alsa}>:
${ALSA_LIBRARIES}
>
$<$<BOOL:${use_pa_oss}>:
$<$<BOOL:${${_OPT}use_pa_oss}>:
${OSS_LIBRARIES}
>
$<$<BOOL:${use_pa_jack}>:
$<$<BOOL:${${_OPT}use_pa_jack}>:
${JACK_LIBRARIES}
>
)

6
cmake-proxies/wxWidgets/CMakeLists.txt

@ -6,8 +6,8 @@ def_vars()
message( STATUS "========== Configuring ${name} ==========" )
option( use_system_${name} "Use ${name} system library if available" ${prefer_system_libs} )
if( use_system_${name} )
option( ${_OPT}use_system_${name} "Use ${name} system library if available" ${${_OPT}prefer_system_libs} )
if( ${_OPT}use_system_${name} )
find_package(wxWidgets)
endif()
@ -53,7 +53,7 @@ if( wxWidgets_FOUND )
else()
message( STATUS "Using local '${name}' library" )
set( use_system_${name} OFF CACHE BOOL "Prefer ${name} system library if available" FORCE )
set( ${_OPT}use_system_${name} OFF CACHE BOOL "Prefer ${name} system library if available" FORCE )
set( WXWIN $ENV{WXWIN} )
if( "${WXWIN}" STREQUAL "" )

3
locale/CMakeLists.txt

@ -70,6 +70,9 @@ if( CMAKE_SYSTEM_NAME MATCHES "Windows" )
elseif( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
find_package( Gettext )
mark_as_advanced( FORCE GETTEXT_MSGFMT_EXECUTABLE )
mark_as_advanced( FORCE GETTEXT_MSGMERGE_EXECUTABLE )
if( GETTEXT_FOUND )
set( msgfmt "${GETTEXT_MSGFMT_EXECUTABLE}" )
else()

63
src/CMakeLists.txt

@ -986,16 +986,15 @@ source_group(
list( APPEND DEFINES
PRIVATE
BUILDING_AUDACITY
XML_STATIC
wxDEBUG_LEVEL=0
WXINTL_NO_GETTEXT_MACRO
WXUSINGDLL
$<$<BOOL:${HAVE_MLOCK}>:
HAVE_MLOCK
>
$<$<PLATFORM_ID:Windows>:
_CRT_SECURE_NO_WARNINGS
__STDC_CONSTANT_MACROS
__WXMSW__
NDEBUG
WIN32
STRICT
>
)
@ -1059,19 +1058,20 @@ list( APPEND LIBRARIES
)
#
# If was have cmake 3.16 or higher, we can use precompiled headers
# If was have cmake 3.16 or higher, we can use precompiled headers, but
# only use them if ccache is not available
#
if( CMAKE_VERSION VERSION_GREATER_EQUAL "3.16" )
if( CMAKE_VERSION VERSION_GREATER_EQUAL "3.16" AND NOT CCACHE_PROGRAM )
set( PRECOMP AudacityHeaders.h )
endif()
# Handle Ladspa option
option( enable_ladspa "Enable LADSPA plug-in support" ON )
set( USE_LADSPA ${enable_ladspa} )
option( ${_OPT}enable_ladspa "Enable LADSPA plug-in support" ON )
set( USE_LADSPA ${${_OPT}enable_ladspa} )
# Handle VST option
option( enable_vst "Enable VST2 plug-in support" ON )
set( USE_VST ${enable_vst} )
option( ${_OPT}enable_vst "Enable VST2 plug-in support" ON )
set( USE_VST ${${_OPT}enable_vst} )
set( AUDACITY_NAME "Audacity" )
set( BUILDING_AUDACITY 1 )
@ -1119,22 +1119,55 @@ if( CMAKE_SYSTEM_NAME MATCHES "Windows" )
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 "${_EXEDIR}" exedir )
# And create the script to copy the WX libs to the exeutable directory
file( WRITE "${_INTDIR}/copy_libs.bat"
"@ECHO OFF
IF NOT %1 EQU xyzzy (
IF EXIST \"${dlls}\" DEL \"${dlls}\"
CALL %0 xyzzy \"%1\" %2
FOR /F \"delims=\" %%c IN ('SORT \"${dlls}\"') DO (
IF NOT EXIST \"%1\"\\%%c (
xcopy \"${libdir}\"\\%%c \"%1\"
)
)
DEL ${dlls}
)
IF %1 EQU xyzzy (
FOR /F %%i IN ('DUMPBIN /DEPENDENTS \"%2\"\\%3 ^| FIND \" wx\"') DO (
ECHO %%i >>\"${dlls}\"
CALL %0 xyzzy \"${libdir}\" %%i
)
)"
)
# Add it to the build
add_custom_command(
TARGET
${TARGET}
COMMAND
XCOPY "*.dll" $<SHELL_PATH:${_DEST}> /I /R /Y
WORKING_DIRECTORY
"${wxlibs}/lib/vc_dll"
${_INTDIR}/copy_libs.bat ${exedir} ${_EXE}.exe
POST_BUILD
)
# Copy the VC runtime libraries as well
add_custom_command(
TARGET
${TARGET}
COMMAND
${CMAKE_COMMAND} -E copy ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} ${_DEST}
POST_BUILD
)
elseif( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
set( _EXE "Audacity" )
# Handle Audio Units option
option( enable_audiounits "Enable Audio Unit plug-in support" ON )
set( USE_AUDIO_UNITS ${enable_audiounits} )
option( ${_OPT}enable_audiounits "Enable Audio Unit plug-in support" ON )
set( USE_AUDIO_UNITS ${${_OPT}enable_audiounits} )
set_target_properties(
${TARGET}

Loading…
Cancel
Save