Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Qt 5.2, iOS and CMake

Qt 5.2, iOS and CMake

Scheduled Pinned Locked Moved Mobile and Embedded
4 Posts 3 Posters 2.4k 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.
  • M Offline
    M Offline
    mkrus
    wrote on last edited by
    #1

    Hi

    can anyone explain, or provide a sample project, how to setup Qt 5.2 using CMake to generate Xcode projects.
    I can do most of the project setup without CMake but handling the moc-ing is a pain so would like to use CMake to setup it all up for me.

    Cheers,

    Mike

    1 Reply Last reply
    0
    • GianlucaG Offline
      GianlucaG Offline
      Gianluca
      wrote on last edited by
      #2

      There is a manual page for it:
      http://qt-project.org/doc/qt-5.1/qtdoc/cmake-manual.html

      1 Reply Last reply
      0
      • S Offline
        S Offline
        steno
        wrote on last edited by
        #3

        I decided not to use CMake to generate things in xcode. I created a build rule for .h files.

        1. Create a new build rule
        2. Change the file extension to *.h
        3. ${QTDIR}/bin/moc ${INPUT_FILE_PATH} -o ${DERIVED_FILES_DIR}/moc_${INPUT_FILE_BASE}.cpp
          4)in the output files add
          $(DERIVED_FILES_DIR)/moc_$(INPUT_FILE_BASE).cpp

        Now all you have to do is add the .h files to the compile sources under the build phases tab.

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mkrus
          wrote on last edited by
          #4

          Was advised to look at https://code.google.com/p/ios-cmake/
          Haven't done so yet...

          Xcode rules seem easy enough, found more detailed description here:
          http://gauthieralexandreblog.wordpress.com/2012/12/14/qt-and-xcode-4-5-how-to-moc-q_object-classes-automatically/

          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