Fix the Github CMake build

Restore the wxDEBUG_LEVEL defines for the module builds.  It is
currently required (see explanation in CMakeLists.txt)

Add explanantion of why wxWidgets_USE_REL_AND_DBG=NO is needed
for the Github Windows build.

Further restrict the disabling dynamic loading for Windows and Mac
of the Lame and FFmpeg libs.  Some corrections need to be made in
ExportMP3.cpp (and probably some for FFmpeg as well).

And don't build mod-nyq-bench or mod-null by default until they
can be fixed.  (They fail to build.)
This commit is contained in:
Leland Lucius 2020-02-23 16:32:36 -06:00
parent 25d0871e55
commit f3ce60ae7a
5 changed files with 47 additions and 7 deletions

View File

@ -136,6 +136,14 @@ jobs:
export WXWIN="${WXWIN//\\//}"
# Configure Audacity
#
# The wxWidgets_USE_REL_AND_DBG is needed because,
# on Github, we only build the Release version of
# wxWidgets and the FindwxWidgets CMake module
# defaults to looking for both. If either of them
# isn't found, then it doesn't provides the required
# library information. This is only a concern for
# Windows.
cmake -S . \
-B build \
-G "${{matrix.config.generator}}" \

View File

@ -19,6 +19,16 @@ list( APPEND INCLUDES
${TARGET_ROOT}
)
list( APPEND DEFINES
PRIVATE
# This is needed until the transition to cmake is complete and
# the Windows pragmas are removed from ModNullCallback.cpp.
# Without it, the wxWidgets "debug.h" will define __WXDEBUG__
# which then causes this module to emit library pragmas for the
# debug versions of wxWidgets...even if the build if for Release.
wxDEBUG_LEVEL=0
)
list( APPEND LIBRARIES
PRIVATE
Audacity
@ -34,6 +44,7 @@ set_target_properties( ${TARGET}
organize_source( "${TARGET_ROOT}" "" "${SOURCES}" )
target_sources( ${TARGET} PRIVATE ${SOURCES} )
target_compile_definitions( ${TARGET} PRIVATE ${DEFINES} )
target_include_directories( ${TARGET} PRIVATE ${INCLUDES} )
target_link_libraries( ${TARGET} PRIVATE ${LIBRARIES} )

View File

@ -19,6 +19,16 @@ list( APPEND INCLUDES
${TARGET_ROOT}
)
list( APPEND DEFINES
PRIVATE
# This is needed until the transition to cmake is complete and
# the Windows pragmas are removed from NyqBench.cpp. Without
# it, the wxWidgets "debug.h" will define __WXDEBUG__ which
# then causes this module to emit library pragmas for the debug
# versions of wxWidgets...even if the build if for Release.
wxDEBUG_LEVEL=0
)
list( APPEND LIBRARIES
PRIVATE
Audacity
@ -36,6 +46,7 @@ set_target_properties( ${TARGET}
organize_source( "${TARGET_ROOT}" "" "${SOURCES}" )
target_sources( ${TARGET} PRIVATE ${SOURCES} )
target_compile_definitions( ${TARGET} PRIVATE ${DEFINES} )
target_include_directories( ${TARGET} PRIVATE ${INCLUDES} )
target_link_libraries( ${TARGET} PRIVATE ${LIBRARIES} )

View File

@ -22,6 +22,13 @@ list( APPEND INCLUDES
list( APPEND DEFINES
PRIVATE
BUILDING_SCRIPT_PIPE
# This is needed until the transition to cmake is complete and
# the Windows pragmas are removed from ScripterCallback.cpp.
# Without it, the wxWidgets "debug.h" will define __WXDEBUG__
# which then causes this module to emit library pragmas for the
# debug versions of wxWidgets...even if the build if for Release.
wxDEBUG_LEVEL=0
)
list( APPEND LIBRARIES

View File

@ -1104,14 +1104,17 @@ set( PKGLIBDIR "${_LIBDIR}" )
set( LIBDIR "${_LIBDIR}" )
set( HAVE_GTK ${GTK_FOUND} )
if( "${${_OPT}use_lame}" STREQUAL "local" )
# Something is wrong in ExportMP3 when this is defined.
# fix it and then uncomment this.
# set( DISABLE_DYNAMIC_LOADING_LAME YES )
endif()
# Do not define these for Windows or Mac until further testing
# can be done against ExportMP3.cpp. If either are defined, the
# build will fail.
if( NOT CMAKE_SYSTEM_NAME MATCHES "Windows|Darwin" )
if( "${${_OPT}use_lame}" STREQUAL "local" )
set( DISABLE_DYNAMIC_LOADING_LAME YES )
endif()
if( "${${_OPT}use_ffmpeg}" STREQUAL "linked" )
set( DISABLE_DYNAMIC_LOADING_FFMPEG YES )
if( "${${_OPT}use_ffmpeg}" STREQUAL "linked" )
set( DISABLE_DYNAMIC_LOADING_FFMPEG YES )
endif()
endif()
if( CMAKE_SYSTEM_NAME MATCHES "Windows" )