Some checks failed
Linux Build / Linux cpu (push) Has been cancelled
Linux Build / Linux cpu-clang (push) Has been cancelled
Linux Build / Linux vulkan (push) Has been cancelled
mac-build / macOS CPU (push) Has been cancelled
Nix Build / Nix (cpu) (push) Has been cancelled
Nix Build / Nix (vulkan) (push) Has been cancelled
windows-build / Windows CPU (push) Has been cancelled
22 lines
1.2 KiB
CMake
22 lines
1.2 KiB
CMake
# Upstream 1.52 fetches Sonic even when USE_LIBSONIC=OFF. Respect that option
|
|
# so a phonemizer-only build has no unnecessary transitive network dependency.
|
|
set(path "${SOURCE_DIR}/cmake/deps.cmake")
|
|
file(READ "${path}" contents)
|
|
string(REPLACE "else()\n FetchContent_Declare(sonic-git" "elseif(USE_LIBSONIC)\n FetchContent_Declare(sonic-git" contents "${contents}")
|
|
file(WRITE "${path}" "${contents}")
|
|
set(path "${SOURCE_DIR}/src/CMakeLists.txt")
|
|
file(READ "${path}" contents)
|
|
if(NOT contents MATCHES "ARCHIVE_OUTPUT_NAME espeak-ng-tool")
|
|
string(APPEND contents "\n# Avoid colliding with the static espeak-ng library on MSVC.\nset_target_properties(espeak-ng-bin PROPERTIES ARCHIVE_OUTPUT_NAME espeak-ng-tool)\n")
|
|
file(WRITE "${path}" "${contents}")
|
|
endif()
|
|
if(BROWSER_BUILD)
|
|
# Musl's wchar.h declares isw* too. Include it before eSpeak redirects those
|
|
# names to UCD, so the macros do not rewrite libc function declarations.
|
|
set(path "${SOURCE_DIR}/src/include/compat/wctype.h")
|
|
file(READ "${path}" contents)
|
|
if(NOT contents MATCHES "#include <wchar.h>")
|
|
string(REPLACE "#include <ucd/ucd.h>" "#include <ucd/ucd.h>\n#include <wchar.h>" contents "${contents}")
|
|
file(WRITE "${path}" "${contents}")
|
|
endif()
|
|
endif()
|