Skip to content

FetchContent #380

@TheMariday

Description

@TheMariday

Hi hi! Long time sphinx-fan, first time bug-raiser

Just wanted to report something I found whilst trying to include this library in my latest project using fetch content.

This could very well be a me issue, however in programs/CMakeLists.txt, I needed to add the following around the check dependency:

  if(CMAKE_PROJECT_NAME STREQUAL PROJECT_NAME)
    add_dependencies(check ${PROGRAM})
  endif()

I have managed to get pocketsphinx standalone to work with the following CMake, however I do have to provide the -hmm, -lm and -dict args as I assume I've broken the default configs including this in the project without installing it?

Thank you and I hope at least this can help others!

My CMakeLists.txt:

FetchContent_Declare(
  pocketsphinx
  GIT_REPOSITORY https://github.com/themariday/pocketsphinx.git
)

FetchContent_MakeAvailable(pocketsphinx)

include_directories(${pocketsphinx_SOURCE_DIR}/src)
include_directories(${pocketsphinx_SOURCE_DIR}/include)
include_directories(${pocketsphinx_SOURCE_DIR}/src/util)

include_directories(${pocketsphinx_BINARY_DIR})
include_directories(${pocketsphinx_BINARY_DIR}/include)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions