1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-31 07:59:27 +02:00

Hoist the generation of the config header into top CMakeLists...

... Because it depends on having visited various lib-src directories, which I
want to delay until visiting various of the modules, and I also want to visit
src before the modules, because that's bottom-up dependency ordering.

So the step should not be done in src.
This commit is contained in:
Paul Licameli 2021-02-12 14:42:37 -05:00 committed by Leland Lucius
parent 25089ff3ee
commit 6f58cb8294
2 changed files with 11 additions and 11 deletions

View File

@ -433,6 +433,17 @@ add_subdirectory( "plug-ins" )
add_subdirectory( "src" )
add_subdirectory( "scripts" )
# Generate config file, which is included by Audacity.h
if( CMAKE_SYSTEM_NAME MATCHES "Windows" )
configure_file( src/audacity_config.h.in src/private/configwin.h )
elseif( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
set( HAVE_VISIBILITY 1 )
configure_file( src/audacity_config.h.in src/private/configmac.h )
else()
set( HAVE_VISIBILITY 1 )
configure_file( src/audacity_config.h.in src/private/configunix.h )
endif()
# Uncomment what follows for symbol values.
#[[
get_cmake_property( _variableNames VARIABLES )

View File

@ -1105,9 +1105,6 @@ if( CMAKE_SYSTEM_NAME MATCHES "Windows" )
../win/audacity.rc
)
# Create the config file
configure_file( audacity_config.h.in private/configwin.h )
# Copy over the wxWidgets DLLs
if( ${_OPT}use_wxwidgets STREQUAL "system" )
set( wxlibs "$ENV{WXWIN}" )
@ -1205,10 +1202,6 @@ elseif( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
# Use the Aqua theme
set( USE_AQUA_THEME 1 )
# Create the config file
set( HAVE_VISIBILITY 1 )
configure_file( audacity_config.h.in private/configmac.h )
# Copy the required wxWidgets libs into the bundle
add_custom_command(
TARGET
@ -1233,10 +1226,6 @@ elseif( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
else()
set_target_property_all( ${TARGET} RUNTIME_OUTPUT_DIRECTORY "${_DEST}" )
# Create the config file
set( HAVE_VISIBILITY 1 )
configure_file( audacity_config.h.in private/configunix.h )
# Build the list of mimetypes
#
# (Don't use generator expressions since it will leave null/empty