mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-10-30 21:25:36 +00:00
Fix for iOS
This commit is contained in:
+5
-2
@@ -6,12 +6,15 @@ project(espeak-ng
|
||||
HOMEPAGE_URL "https://github.com/espeak-ng/espeak-ng"
|
||||
)
|
||||
|
||||
option(BUILD_ESPEAK_NG_EXE "Whether to build espeak-ng-bin" ON)
|
||||
option(BUILD_ESPEAK_NG_TESTS "Whether to build tests" ON)
|
||||
|
||||
include(CTest)
|
||||
|
||||
include(cmake/deps.cmake)
|
||||
include(cmake/config.cmake)
|
||||
add_subdirectory(src)
|
||||
if(NOT CMAKE_CROSSCOMPILING)
|
||||
if(BUILD_ESPEAK_NG_EXE)
|
||||
include(cmake/data.cmake)
|
||||
endif()
|
||||
include(cmake/docs.cmake)
|
||||
@@ -19,7 +22,7 @@ include(cmake/docs.cmake)
|
||||
include(cmake/package.cmake)
|
||||
include(CPack)
|
||||
|
||||
if(NOT CMAKE_CROSSCOMPILING)
|
||||
if(BUILD_ESPEAK_NG_TESTS)
|
||||
include(CTest)
|
||||
add_subdirectory(tests)
|
||||
endif()
|
||||
|
||||
+27
-25
@@ -5,31 +5,33 @@ add_subdirectory(ucd-tools)
|
||||
add_subdirectory(speechPlayer)
|
||||
add_subdirectory(libespeak-ng)
|
||||
|
||||
add_executable(espeak-ng-bin espeak-ng.c)
|
||||
target_link_libraries(
|
||||
espeak-ng-bin PRIVATE espeak-ng espeak-ng-config
|
||||
)
|
||||
if (MINGW)
|
||||
target_link_options(espeak-ng-bin PRIVATE "-static-libstdc++" "-static")
|
||||
endif()
|
||||
if (MSVC)
|
||||
target_sources(espeak-ng-bin PRIVATE compat/getopt.c)
|
||||
endif()
|
||||
if (NOT WIN32)
|
||||
add_custom_target(
|
||||
speak-ng ALL
|
||||
COMMAND ${CMAKE_COMMAND} -E create_symlink espeak-ng ${CMAKE_CURRENT_BINARY_DIR}/speak-ng
|
||||
COMMAND ${CMAKE_COMMAND} -E create_symlink espeak-ng ${CMAKE_CURRENT_BINARY_DIR}/espeak
|
||||
COMMAND ${CMAKE_COMMAND} -E create_symlink espeak-ng ${CMAKE_CURRENT_BINARY_DIR}/speak
|
||||
COMMENT "Link espeak-ng to compat names"
|
||||
DEPENDS espeak-ng-bin
|
||||
if(BUILD_ESPEAK_NG_EXE)
|
||||
add_executable(espeak-ng-bin espeak-ng.c)
|
||||
target_link_libraries(
|
||||
espeak-ng-bin PRIVATE espeak-ng espeak-ng-config
|
||||
)
|
||||
endif()
|
||||
install(TARGETS espeak-ng-bin)
|
||||
install(DIRECTORY include/espeak include/espeak-ng TYPE INCLUDE)
|
||||
if (MINGW)
|
||||
target_link_options(espeak-ng-bin PRIVATE "-static-libstdc++" "-static")
|
||||
endif()
|
||||
if (MSVC)
|
||||
target_sources(espeak-ng-bin PRIVATE compat/getopt.c)
|
||||
endif()
|
||||
if (NOT WIN32)
|
||||
add_custom_target(
|
||||
speak-ng ALL
|
||||
COMMAND ${CMAKE_COMMAND} -E create_symlink espeak-ng ${CMAKE_CURRENT_BINARY_DIR}/speak-ng
|
||||
COMMAND ${CMAKE_COMMAND} -E create_symlink espeak-ng ${CMAKE_CURRENT_BINARY_DIR}/espeak
|
||||
COMMAND ${CMAKE_COMMAND} -E create_symlink espeak-ng ${CMAKE_CURRENT_BINARY_DIR}/speak
|
||||
COMMENT "Link espeak-ng to compat names"
|
||||
DEPENDS espeak-ng-bin
|
||||
)
|
||||
endif()
|
||||
install(TARGETS espeak-ng-bin)
|
||||
install(DIRECTORY include/espeak include/espeak-ng TYPE INCLUDE)
|
||||
|
||||
if (ESPEAK_COMPAT AND NOT WIN32)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/speak-ng DESTINATION bin)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/espeak DESTINATION bin)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/speak DESTINATION bin)
|
||||
if (ESPEAK_COMPAT AND NOT WIN32)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/speak-ng DESTINATION bin)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/espeak DESTINATION bin)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/speak DESTINATION bin)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#define ENDIAN_H_COMPAT_SHIM
|
||||
#pragma once
|
||||
|
||||
#if __has_include_next(<endian.h>)
|
||||
#if __has_include_next(<endian.h>) && !defined(__APPLE__)
|
||||
# pragma GCC system_header // Silence "warning: #include_next is a GCC extension"
|
||||
# include_next <endian.h>
|
||||
#elif __has_include(<sys/endian.h>)
|
||||
|
||||
Reference in New Issue
Block a user