Warning, /multimedia/subtitlecomposer/src/speechplugins/pocketsphinx/CMakeLists.txt is written in an unsupported language. File is not indexed.
0001 find_package(PocketSphinx 5) 0002 if(NOT POCKETSPHINX_FOUND) 0003 message(STATUS "Have NOT Found PocketSphinx - Speech plugin will not be built") 0004 return() 0005 endif() 0006 0007 set(speech_pocketsphinx_SRCS 0008 ../../speechprocessor/speechplugin.cpp 0009 pocketsphinxplugin.cpp 0010 pocketsphinxconfigwidget.cpp 0011 CACHE INTERNAL EXPORTEDVARIABLE 0012 ) 0013 ki18n_wrap_ui(speech_pocketsphinx_SRCS 0014 pocketsphinxconfigwidget.ui 0015 ) 0016 kconfig_add_kcfg_files(speech_pocketsphinx_SRCS GENERATE_MOC 0017 ${CMAKE_CURRENT_SOURCE_DIR}/pocketsphinxconfig.kcfgc 0018 ) 0019 0020 add_library(pocketsphinxasr MODULE ${speech_pocketsphinx_SRCS}) 0021 0022 install(TARGETS pocketsphinxasr DESTINATION ${SC_PLUGIN_INSTALL_DIR}) 0023 0024 target_include_directories(pocketsphinxasr SYSTEM PRIVATE 0025 ${CMAKE_CURRENT_BINARY_DIR} # so files can find plugin-config.h 0026 ${POCKETSPHINX_INCLUDE_DIRS}) 0027 target_link_libraries(pocketsphinxasr 0028 Qt${QT_MAJOR_VERSION}::Core Qt${QT_MAJOR_VERSION}::Widgets Qt${QT_MAJOR_VERSION}::Gui 0029 KF${KF_MAJOR_VERSION}::I18n KF${KF_MAJOR_VERSION}::ConfigGui 0030 KF${KF_MAJOR_VERSION}::KIOCore KF${KF_MAJOR_VERSION}::KIOFileWidgets KF${KF_MAJOR_VERSION}::KIOWidgets 0031 ${POCKETSPHINX_LIBRARIES}) 0032 0033 add_dependencies(pocketsphinxasr subtitlecomposer) 0034 0035 configure_file(${CMAKE_CURRENT_SOURCE_DIR}/plugin-config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/plugin-config.h) 0036 0037 set(CMAKE_REQUIRED_INCLUDES ${POCKETSPHINX_INCLUDE_DIRS}) 0038 set(CMAKE_REQUIRED_LIBRARIES ${POCKETSPHINX_LIBRARIES}) 0039 check_cxx_source_compiles("#include <pocketsphinx.h>\nint main(){ ps_seg_iter(nullptr); return 0; }" PocketSphinx_NEW_ps_seg_iter) 0040 if(PocketSphinx_NEW_ps_seg_iter) 0041 target_compile_definitions(pocketsphinxasr PRIVATE HAS_NEW_PS_SEG_ITER=1) 0042 endif()