mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-16 16:10:06 +02:00
Fix build Mac and Linux
This commit is contained in:
parent
3d0e86a8f8
commit
2084c39046
@ -8,7 +8,6 @@
|
||||
#
|
||||
message( "==================================================================" )
|
||||
message( "Copying wxWidgets libraries:" )
|
||||
message( "${SRC} ${DST}" )
|
||||
message( "==================================================================" )
|
||||
|
||||
# list command no longer ignores empty elements.
|
||||
@ -62,7 +61,7 @@ function( gather_libs src )
|
||||
foreach( line ${output} )
|
||||
if( line MATCHES "^.*libwx.*\\.dylib " )
|
||||
string( REGEX REPLACE "dylib .*" "dylib" line "${line}" )
|
||||
if( NOT line STREQUAL "${src}" )
|
||||
if( NOT line STREQUAL "${src}" AND NOT line MATCHES "@executable" )
|
||||
set( lib ${line} )
|
||||
|
||||
list( APPEND libs ${lib} )
|
||||
@ -75,7 +74,9 @@ function( gather_libs src )
|
||||
endif()
|
||||
endforeach()
|
||||
elseif( CMAKE_HOST_SYSTEM_NAME MATCHES "Linux" )
|
||||
execute( output ldd ${src} )
|
||||
execute( output sh -c "LD_LIBRARY_PATH='${WXWIN}' ldd ${src}" )
|
||||
|
||||
get_filename_component( libname "${src}" NAME )
|
||||
|
||||
foreach( line ${output} )
|
||||
if( line MATCHES ".*libwx.*" )
|
||||
|
@ -61,6 +61,14 @@ if( wxWidgets_FOUND )
|
||||
>
|
||||
)
|
||||
|
||||
set( WXWIN $ENV{WXWIN} CACHE INTERNAL "" )
|
||||
if( WXWIN )
|
||||
string( APPEND WXWIN "/lib" )
|
||||
else()
|
||||
set( WXWIN "${wxWidgets_LIBRARY_DIRS}" )
|
||||
endif()
|
||||
set( WXWIN "${WXWIN}" CACHE INTERNAL "" )
|
||||
|
||||
set( toolkit "${wxWidgets_LIBRARIES}" )
|
||||
else()
|
||||
message( STATUS "Using local '${name}' library" )
|
||||
|
@ -1264,6 +1264,7 @@ else()
|
||||
COMMAND
|
||||
${CMAKE_COMMAND} -D SRC="${_EXEDIR}/audacity"
|
||||
-D DST="${_DEST}/${_PKGLIB}"
|
||||
-D WXWIN="${WXWIN}"
|
||||
-P ${CMAKE_MODULE_PATH}/CopyLibs.cmake
|
||||
POST_BUILD
|
||||
)
|
||||
|
Loading…
x
Reference in New Issue
Block a user