2014-04-28 19:33:48 +00:00
|
|
|
if (SYSTEM_FLITE)
|
|
|
|
set(Flite_FIND_REQUIRED TRUE)
|
|
|
|
find_package(Flite)
|
2014-03-10 09:32:03 +00:00
|
|
|
|
2014-04-28 19:33:48 +00:00
|
|
|
message(STATUS "Using Flite includes at: ${FLITE_INCLUDE_DIR}")
|
|
|
|
message(STATUS "Using Flite libraries: ${FLITE_LIBRARIES}")
|
|
|
|
else()
|
|
|
|
set(FLITE_SOURCES
|
|
|
|
flite/src/hrg/cst_ffeature.c
|
|
|
|
flite/src/hrg/cst_item.c
|
|
|
|
flite/src/hrg/cst_relation.c
|
|
|
|
flite/src/hrg/cst_utterance.c
|
|
|
|
|
|
|
|
flite/src/lexicon/cst_lexicon.c
|
|
|
|
flite/src/lexicon/cst_lts.c
|
|
|
|
|
|
|
|
flite/src/regex/cst_regex.c
|
|
|
|
flite/src/regex/regexp.c
|
|
|
|
|
|
|
|
flite/src/stats/cst_cart.c
|
|
|
|
|
|
|
|
flite/src/synth/cst_ffeatures.c
|
|
|
|
flite/src/synth/cst_phoneset.c
|
|
|
|
flite/src/synth/cst_synth.c
|
|
|
|
flite/src/synth/cst_utt_utils.c
|
|
|
|
flite/src/synth/cst_voice.c
|
|
|
|
flite/src/synth/flite.c
|
|
|
|
|
|
|
|
flite/src/utils/cst_alloc.c
|
|
|
|
flite/src/utils/cst_error.c
|
|
|
|
flite/src/utils/cst_features.c
|
|
|
|
flite/src/utils/cst_string.c
|
|
|
|
flite/src/utils/cst_tokenstream.c
|
|
|
|
flite/src/utils/cst_val.c
|
|
|
|
flite/src/utils/cst_val_const.c
|
|
|
|
flite/src/utils/cst_val_user.c
|
|
|
|
)
|
|
|
|
|
|
|
|
set(FLITE_LANG_SOURCES
|
|
|
|
flite/lang/cmu_us_kal/cmu_us_kal.c
|
|
|
|
|
|
|
|
flite/lang/cmulex/cmu_lex.c
|
|
|
|
flite/lang/cmulex/cmu_lex_data.c
|
|
|
|
flite/lang/cmulex/cmu_lex_entries.c
|
|
|
|
flite/lang/cmulex/cmu_lts_model.c
|
|
|
|
flite/lang/cmulex/cmu_lts_rules.c
|
|
|
|
flite/lang/cmulex/cmu_postlex.c
|
|
|
|
|
|
|
|
flite/lang/usenglish/us_aswd.c
|
|
|
|
flite/lang/usenglish/us_expand.c
|
|
|
|
flite/lang/usenglish/us_ffeatures.c
|
|
|
|
flite/lang/usenglish/us_gpos.c
|
|
|
|
flite/lang/usenglish/us_int_accent_cart.c
|
|
|
|
flite/lang/usenglish/us_int_tone_cart.c
|
|
|
|
flite/lang/usenglish/us_nums_cart.c
|
|
|
|
flite/lang/usenglish/us_phoneset.c
|
|
|
|
flite/lang/usenglish/us_phrasing_cart.c
|
|
|
|
flite/lang/usenglish/us_pos_cart.c
|
|
|
|
flite/lang/usenglish/us_text.c
|
|
|
|
flite/lang/usenglish/usenglish.c
|
|
|
|
)
|
2014-04-30 14:27:25 +00:00
|
|
|
|
2014-04-28 19:33:48 +00:00
|
|
|
endif()
|
|
|
|
|
2020-08-19 13:49:50 +00:00
|
|
|
add_library(flightgear_flite_hts STATIC
|
2014-03-10 09:32:03 +00:00
|
|
|
${FLITE_SOURCES}
|
|
|
|
${FLITE_LANG_SOURCES}
|
|
|
|
lib/flite_hts_engine.c
|
|
|
|
)
|
|
|
|
|
2020-08-19 13:49:50 +00:00
|
|
|
target_include_directories(flightgear_flite_hts PUBLIC ${PROJECT_SOURCE_DIR}/3rdparty/flite_hts_engine/include)
|
|
|
|
target_compile_definitions(flightgear_flite_hts PRIVATE -DNO_UNION_INITIALIZATION -DFLITE_PLUS_HTS_ENGINE)
|
|
|
|
|
2020-08-24 16:40:35 +00:00
|
|
|
if (X86_64)
|
|
|
|
target_compile_definitions(flightgear_flite_hts PRIVATE -DSIZEOF_VOID_P=8)
|
|
|
|
endif()
|
|
|
|
|
2023-01-09 10:36:18 +00:00
|
|
|
if (NOT MSVC)
|
|
|
|
target_compile_options(flightgear_flite_hts PRIVATE -Wno-unused-function )
|
|
|
|
endif()
|
|
|
|
|
2020-08-19 13:49:50 +00:00
|
|
|
# link against HTSEngine: either our own one, or the system one
|
|
|
|
target_link_libraries(flightgear_flite_hts PUBLIC Flightgear::HTSEngine)
|
|
|
|
|
2014-04-28 19:33:48 +00:00
|
|
|
if (SYSTEM_FLITE)
|
2020-08-23 10:28:59 +00:00
|
|
|
target_link_libraries(flightgear_flite_hts PUBLIC Flightgear::Flite)
|
2020-08-19 13:49:50 +00:00
|
|
|
else()
|
|
|
|
target_include_directories(flightgear_flite_hts PRIVATE ${PROJECT_SOURCE_DIR}/3rdparty/flite_hts_engine/flite/include)
|
|
|
|
target_include_directories(flightgear_flite_hts PRIVATE ${PROJECT_SOURCE_DIR}/3rdparty/flite_hts_engine/flite/lang/cmulex)
|
|
|
|
target_include_directories(flightgear_flite_hts PRIVATE ${PROJECT_SOURCE_DIR}/3rdparty/flite_hts_engine/flite/lang/usenglish)
|
2014-04-28 19:33:48 +00:00
|
|
|
endif()
|
|
|
|
|
2020-08-19 13:49:50 +00:00
|
|
|
|