Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt 5.12.4 TextToSpeech with CMake
QtWS25 Last Chance

Qt 5.12.4 TextToSpeech with CMake

Scheduled Pinned Locked Moved Solved General and Desktop
text to speechcmake
3 Posts 2 Posters 916 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    KroMignon
    wrote on 28 Aug 2019, 07:47 last edited by
    #1

    Hi all,

    I am new to CMake and I want to build a CMake based project using TextToSpeech. This project was done with an old version of Qt (5.8).

    In Qt 5.8, the TextToSpeech engine was an external module, so to use it, in the CMakeLists.txt was:

    ...
    set(TtsExample_LIBS
        Qt5::Widgets
        Qt5::Positioning
        Qt5::TextToSpeech
    )
    
    find_package(Qt5Widgets)
    find_package(Qt5Positioning)
    find_package(Qt5TextToSpeech)
    

    But with Qt 5.12.4, the TTS Engine is part of the Core Lib, and CMake ends with an error:

    CMake Error at CMakeLists.txt:84 (add_executable):
    Target "TtsExample" links to target "Qt5::TextToSpeech" but the target was
    not found. Perhaps a find_package() call is missing for an IMPORTED
    target, or an ALIAS target is missing?

    Enable TextToSpeech with QMake is easy, I only have to add QT += texttoseech in the PRO file.
    But how do I have to change my CMakeLists.txt to do the same with CMake?

    I am using:

    • Qt 5.12.4 for Windows 32 bits (MSVC 2017)
    • CMake 3.15.2 32 bits
    • Qt Creator 4.10 rc1

    Thanks for any help or pointer, I've searched on Qt documentation, but didn't find how to do it.

    It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

    K 1 Reply Last reply 28 Aug 2019, 10:19
    0
    • K KroMignon
      28 Aug 2019, 07:47

      Hi all,

      I am new to CMake and I want to build a CMake based project using TextToSpeech. This project was done with an old version of Qt (5.8).

      In Qt 5.8, the TextToSpeech engine was an external module, so to use it, in the CMakeLists.txt was:

      ...
      set(TtsExample_LIBS
          Qt5::Widgets
          Qt5::Positioning
          Qt5::TextToSpeech
      )
      
      find_package(Qt5Widgets)
      find_package(Qt5Positioning)
      find_package(Qt5TextToSpeech)
      

      But with Qt 5.12.4, the TTS Engine is part of the Core Lib, and CMake ends with an error:

      CMake Error at CMakeLists.txt:84 (add_executable):
      Target "TtsExample" links to target "Qt5::TextToSpeech" but the target was
      not found. Perhaps a find_package() call is missing for an IMPORTED
      target, or an ALIAS target is missing?

      Enable TextToSpeech with QMake is easy, I only have to add QT += texttoseech in the PRO file.
      But how do I have to change my CMakeLists.txt to do the same with CMake?

      I am using:

      • Qt 5.12.4 for Windows 32 bits (MSVC 2017)
      • CMake 3.15.2 32 bits
      • Qt Creator 4.10 rc1

      Thanks for any help or pointer, I've searched on Qt documentation, but didn't find how to do it.

      K Offline
      K Offline
      KroMignon
      wrote on 28 Aug 2019, 10:19 last edited by
      #2

      @kromignon I reply to my self... After restarting Qt Creator, opening the CMake project works also with Qt 5.12.4...
      Don't understand why?

      It seems to me that CMake is not very stable!

      It is an old maxim of mine that when you have excluded the impossible, whatever remains, however improbable, must be the truth. (Sherlock Holmes)

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mrjj
        Lifetime Qt Champion
        wrote on 28 Aug 2019, 10:24 last edited by
        #3

        HI
        CMake integration into Creator is very basic and we also had many issues with it not parsing the project file the first time.
        However it got a bit better with never Creators.

        1 Reply Last reply
        0

        2/3

        28 Aug 2019, 10:19

        • Login

        • Login or register to search.
        2 out of 3
        • First post
          2/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved