1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-27 15:50:10 +01:00

Remove gettext download for Mac in CMake build

And added a python version that will be used on all platforms
when a suitable msgfmt isn't installed.  (As long as python
is installed.)

Extracted all the Audacity specific functions from main cmake
list and moved them to their own module.

Rearrange the main cmake module a bit and misc. cleanup.
This commit is contained in:
Leland Lucius
2020-02-29 01:49:55 -06:00
parent fe09b0c4ac
commit caab2a56c9
6 changed files with 583 additions and 323 deletions

View File

@@ -6,6 +6,11 @@ message( STATUS "========== Configuring ${TARGET} ==========" )
def_vars()
if( NOT DEFINED PYTHON )
message( WARNING "Python not found...unable to produce manual." )
return()
endif()
set( host "alphamanual.audacityteam.org" )
set( src "https://${host}/man" )
set( dst "${_DEST}/help/manual" )
@@ -14,26 +19,11 @@ set( script "mw2html.py" )
set( out_dir "${_INTDIR}" )
set( out "${out_dir}/${host}/index.html" )
if( CMAKE_SYSTEM_NAME MATCHES "Windows" )
nuget_package( pkgdir "python2" "2.7.17" )
file( TO_NATIVE_PATH "${pkgdir}/tools/python.exe" python )
else()
find_package( Python2 )
if( Python2_FOUND )
set( python "${Python2_EXECUTABLE}" )
endif()
endif()
if( NOT DEFINED python )
message( WARNING "Python not found...unable to produce manual." )
return()
endif()
add_custom_command(
COMMENT
"Downloading manual from: ${src}"
COMMAND
"${python}" "${script_dir}/${script}" -s "${src}" "${out_dir}"
"${PYTHON}" "${script_dir}/${script}" -s "${src}" "${out_dir}"
COMMAND
${CMAKE_COMMAND} -E copy_directory "${out_dir}/${host}" "${dst}"
WORKING_DIRECTORY