######################################################################################
##                                                                                  ##
## AUTHOR  : Aby Louw                                                               ##
## DATE    : June 2010                                                              ##
##                                                                                  ##
######################################################################################
##                                                                                  ##
## Speect plug-in options                                                           ##
##                                                                                  ##
##                                                                                  ##
######################################################################################


#------------------------------------------------------------------------------------#
#                                   HTS Engine                                       #
#------------------------------------------------------------------------------------#

# HAVE_HTS used in speect/plugins/processors/features/nlp/CMakeLists.txt
unset(HAVE_HTS CACHE)
mark_as_advanced(HAVE_HTS)

# 102
set(HTS_ENGINE_INCLUDE_102 CACHE PATH "Path to HTS Engine (1.02) include directory")
set(HTS_ENGINE_LIB_102 CACHE FILEPATH "HTS Engine (1.02) library location (full path and library)")
if(HTS_ENGINE_INCLUDE_102 AND HTS_ENGINE_LIB_102)
  set(HAVE_HTS "on" CACHE BOOL "Variable to check if hts_engine has been defined")
endif(HTS_ENGINE_INCLUDE_102 AND HTS_ENGINE_LIB_102)

# 103
set(HTS_ENGINE_INCLUDE_103 CACHE PATH "Path to HTS Engine (1.03) include directory")
set(HTS_ENGINE_LIB_103 CACHE FILEPATH "HTS Engine (1.03) library location (full path and library)")
if(HTS_ENGINE_INCLUDE_103 AND HTS_ENGINE_LIB_103)
  set(HAVE_HTS "on" CACHE BOOL "Variable to check if hts_engine has been defined")
endif(HTS_ENGINE_INCLUDE_103 AND HTS_ENGINE_LIB_103)

# 104
set(HTS_ENGINE_INCLUDE_104 CACHE PATH "Path to HTS Engine (1.04) include directory")
set(HTS_ENGINE_LIB_104 CACHE FILEPATH "HTS Engine (1.04) library location (full path and library)")
if(HTS_ENGINE_INCLUDE_104 AND HTS_ENGINE_LIB_104)
  set(HAVE_HTS "on" CACHE BOOL "Variable to check if hts_engine has been defined")
endif(HTS_ENGINE_INCLUDE_104 AND HTS_ENGINE_LIB_104)

# 105
set(HTS_ENGINE_INCLUDE_105 CACHE PATH "Path to HTS Engine (1.05) include directory")
set(HTS_ENGINE_LIB_105 CACHE FILEPATH "HTS Engine (1.05) library location (full path and library)")
if(HTS_ENGINE_INCLUDE_105 AND HTS_ENGINE_LIB_105)
  set(HAVE_HTS "on" CACHE BOOL "Variable to check if hts_engine has been defined")
endif(HTS_ENGINE_INCLUDE_105 AND HTS_ENGINE_LIB_105)

# 105 (mixed excitation)
set(HTS_ENGINE_ME_INCLUDE_105 CACHE PATH "Path to HTS Engine (1.05 mixed excitation) include directory")
set(HTS_ENGINE_ME_LIB_105 CACHE FILEPATH "HTS Engine (1.05 mixed excitation) library location (full path and library)")
if(HTS_ENGINE_ME_INCLUDE_105 AND HTS_ENGINE_ME_LIB_105)
  set(HAVE_HTS "on" CACHE BOOL "Variable to check if hts_engine (mixed excitation) has been defined")
endif(HTS_ENGINE_ME_INCLUDE_105 AND HTS_ENGINE_ME_LIB_105)

# 106
set(HTS_ENGINE_INCLUDE_106 CACHE PATH "Path to HTS Engine (1.06) include directory")
set(HTS_ENGINE_LIB_106 CACHE FILEPATH "HTS Engine (1.06) library location (full path and library)")
if(HTS_ENGINE_INCLUDE_106 AND HTS_ENGINE_LIB_106)
  set(HAVE_HTS "on" CACHE BOOL "Variable to check if hts_engine has been defined")
endif(HTS_ENGINE_INCLUDE_106 AND HTS_ENGINE_LIB_106)


#------------------------------------------------------------------------------------#
#                                 hunpos POS tagger                                  #
#------------------------------------------------------------------------------------#

# WANT_HUNPOS_POSTAGGER used in speect/plugins/processors/utterances/nlp/CMakeLists.txt
option(WANT_HUNPOS_POSTAGGER "Enable hunpos pos-tagger utterance processor." off)

# Backward compatibility option
if(HUNPOS_INCLUDE)
  set(HUNPOS_INCLUDE_DIRS ${HUNPOS_INCLUDE})
endif(HUNPOS_INCLUDE)
if(HUNPOS_LIB)
  set(HUNPOS_LIBRARIES ${HUNPOS_LIB})
endif(HUNPOS_LIB)
if(HUNPOS_LIB AND HUNPOS_INCLUDE)
  set(WANT_HUNPOS_POSTAGGER ON)
endif(HUNPOS_LIB AND HUNPOS_INCLUDE)

if(WANT_HUNPOS_POSTAGGER)
  find_package(hunpos)
  # HAVE_HUNPOS used in speect/plugins/processors/utterances/nlp/CMakeLists.txt
  unset(HAVE_HUNPOS CACHE)
  mark_as_advanced(HAVE_HUNPOS)

  if(HUNPOS_INCLUDE_DIRS AND HUNPOS_LIBRARIES)
    set(HAVE_HUNPOS "on" CACHE BOOL "Variable to check if hunpos has been defined")
  endif(HUNPOS_INCLUDE_DIRS AND HUNPOS_LIBRARIES)
  if(NOT HAVE_HUNPOS)
    message(FATAL_ERROR "Hunpos library not found!")
  endif(NOT HAVE_HUNPOS)
endif(WANT_HUNPOS_POSTAGGER)

# Specific utterance processosors

# WANT_CRFSUITE_POSTAGGER used in speect/plugins/processors/utterances/nlp/CMakeLists.txt
option(WANT_CRFSUITE_POSTAGGER "Enable crfsuite pos-tagger utterance processor." off)

# WANT_TEXTEXP_NORMALIZER used in speect/plugins/processors/utterances/nlp/CMakeLists.txt
option(WANT_TEXTEXP_NORMALIZER "Enable textexp normalizer utterance processor." off)
