mirror of
https://codeberg.org/tenacityteam/tenacity
synced 2025-10-09 18:22:36 +02:00
CMake: Unify config header
config.h is now used on all platforms rather than three separate configwin.h, configmac.h, and configunix.h Signed-off-by: Avery King <gperson@disroot.org>
This commit is contained in:
@@ -749,16 +749,12 @@ add_subdirectory( "modules" )
|
||||
add_subdirectory( "scripts" )
|
||||
|
||||
# Generate config file
|
||||
if( CMAKE_SYSTEM_NAME MATCHES "Windows" )
|
||||
configure_file( src/tenacity_config.h.in src/private/configwin.h )
|
||||
elseif( CMAKE_SYSTEM_NAME MATCHES "Darwin" )
|
||||
set( HAVE_VISIBILITY 1 )
|
||||
configure_file( src/tenacity_config.h.in src/private/configmac.h )
|
||||
else()
|
||||
set( HAVE_VISIBILITY 1 )
|
||||
configure_file( src/tenacity_config.h.in src/private/configunix.h )
|
||||
if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
|
||||
set(HAVE_VISIBILITY 1)
|
||||
endif()
|
||||
|
||||
configure_file(src/tenacity_config.h.in src/private/config.h)
|
||||
|
||||
# Generate a picture of module dependencies
|
||||
string( JOIN "\n" GRAPH_EDGES ${GRAPH_EDGES} )
|
||||
# Choose edge attributes making it easy to hover at either end of edge
|
||||
|
@@ -163,9 +163,8 @@ function( tenacity_append_common_compiler_options var use_pch )
|
||||
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>
|
||||
$<$<CXX_COMPILER_ID:MSVC>:/FI${CMAKE_BINARY_DIR}/src/private/config.h>
|
||||
$<$<NOT:$<CXX_COMPILER_ID:MSVC>>:-include ${CMAKE_BINARY_DIR}/src/private/config.h>
|
||||
)
|
||||
endif()
|
||||
list( APPEND ${var}
|
||||
|
@@ -1280,9 +1280,7 @@ if( NOT CCACHE_PROGRAM AND NOT SCCACHE_PROGRAM )
|
||||
if( PCH )
|
||||
message( STATUS "Using precompiled headers" )
|
||||
target_precompile_headers( ${TARGET} PRIVATE
|
||||
$<$<PLATFORM_ID:Windows>:${CMAKE_BINARY_DIR}/src/private/configwin.h>
|
||||
$<$<PLATFORM_ID:Darwin>:${CMAKE_BINARY_DIR}/src/private/configmac.h>
|
||||
$<$<NOT:$<PLATFORM_ID:Windows,Darwin>>:${CMAKE_BINARY_DIR}/src/private/configunix.h>
|
||||
${CMAKE_BINARY_DIR}/src/private/config.h
|
||||
AudacityHeaders.h
|
||||
)
|
||||
else()
|
||||
|
Reference in New Issue
Block a user