1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-04-29 23:29:41 +02:00

Inclusion of the correct config header on command line using CMake

This commit is contained in:
Paul Licameli 2021-05-08 20:21:12 -04:00 committed by Leland Lucius
parent 229b82a502
commit 794f4e5877
3 changed files with 7 additions and 23 deletions

View File

@ -439,7 +439,7 @@ add_subdirectory( "nyquist" )
add_subdirectory( "plug-ins" )
add_subdirectory( "scripts" )
# Generate config file, which is included by Audacity.h
# Generate config file
if( CMAKE_SYSTEM_NAME MATCHES "Windows" )
configure_file( src/audacity_config.h.in src/private/configwin.h )
elseif( CMAKE_SYSTEM_NAME MATCHES "Darwin" )

View File

@ -208,6 +208,12 @@ endmacro()
function( audacity_append_common_compiler_options var )
list( APPEND ${var}
PRIVATE
# include the correct config file; give absolute path to it, so
# that this works whether in src, modules, libraries
$<$<PLATFORM_ID:Windows>:/FI${CMAKE_BINARY_DIR}/src/private/configwin.h>
$<$<PLATFORM_ID:Darwin>:-include ${CMAKE_BINARY_DIR}/src/private/configmac.h>
$<$<NOT:$<PLATFORM_ID:Windows,Darwin>>:-include ${CMAKE_BINARY_DIR}/src/private/configunix.h>
# This renames a good use of this C++ keyword that we don't need
# to review when hunting for leaks because of naked new and delete.
-DPROHIBITED==delete

View File

@ -91,26 +91,4 @@
class wxWindow;
#ifdef __WXMAC__
#include "configmac.h"
#endif
#ifdef __WXGTK__
#ifndef __CONFIG_UNIX_INCLUDED
#define __CONFIG_UNIX_INCLUDED
#include "configunix.h"
#endif
#endif
#ifdef __WXX11__
#ifndef __CONFIG_UNIX_INCLUDED
#define __CONFIG_UNIX_INCLUDED
#include "configunix.h"
#endif
#endif
#ifdef __WXMSW__
#include "configwin.h"
#endif
#endif // __AUDACITY_H__