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. CMake and AUTOMOC: *syntax error: 'constant'* when using FetchContent
Forum Updated to NodeBB v4.3 + New Features

CMake and AUTOMOC: *syntax error: 'constant'* when using FetchContent

Scheduled Pinned Locked Moved Unsolved General and Desktop
cmake
2 Posts 2 Posters 39 Views 1 Watching
  • 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.
  • S Offline
    S Offline
    snoriman
    wrote last edited by
    #1

    I've got a project where I'm including SQLite via FetchContent and whenever I include that external, I run into an error:

    <build>\_deps\sqlite-src\version(1,1): error C2059: syntax error: 'constant'
    

    Initially I thought that the reason for this error was because I was using the SOURCE_DIR property with FetchContent_Declare but although I think this is somewhat related, I think that the root cause for this error is that I'm adding the directory of sqlite as an include directory. For example I'm doing something like:
    include_directories(dir_to_sqlite_dep)

    Is there a way to solve this?

    1 Reply Last reply
    0
    • S snoriman referenced this topic
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote last edited by
      #2

      Hi,

      Can you provide a minimal project that shows this issue ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0

      • Login

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