2

I have a pure C++ console app which runs on OSX & I need to extend it as cross-platform (iOS+Android+OSX) with a simple UI for which I am planning to use commercial Qt. The app's code compiles on g++ as well as clang++. I verified it by making a .pro & ran it on iOS & android. It works fine.

But I want to maintain the app with CMakeLists.txt instead of a .pro file. Is it possible ?

Importing the CMakeLists.txt into the QtCreator gives all options for android, iOS & OSX but doesn't load the source code files !

How can I make a Qt app for iOS & android using CMakeLists.txt ?

TheWaterProgrammer
  • 7,055
  • 12
  • 70
  • 159
  • You could try to create a test project from scratch using CMakeLists.txt... not sure if Qt Creator can do it for you. Also one thing that comes to mind is, if you have several build system files in the same folder for same project, and that confuses Qt Creator. – hyde May 27 '17 at 14:53
  • There seems to be no way to create a project from scratch on QtCreator & output a `CMakeLists.txt` instead of a `.pro` file. I am looking for answers around importing an existing `CMakeLists.txt` into QtCreator & somehow make it work ? if possible ? – TheWaterProgrammer May 27 '17 at 15:00
  • Have you tried the File->New File or Project->Import Existing Project-Import Existing Project feature? It adds separete Qt Creator project files (which contain the files in it and the commands you want to use to build it). – hyde May 27 '17 at 15:08
  • I tried it. Importing an existing `CMakeLists.txt` into `QtCreator` does not work – TheWaterProgrammer May 27 '17 at 15:13
  • Qt should work with `CMakeLists.txt` additionally. it would be so convenient to port existing projects to Qt – TheWaterProgrammer May 27 '17 at 15:15

0 Answers0