How to add existing files to a CMake project?
-
wrote on 11 Feb 2022, 11:02 last edited by idlefrog
Having converted to CMake. Does QtCreator allow you to add existing files to 'Sources'? This option is always greyed out from the project view context menu.
Or should we always manually edit our CMakeLists.txt files?[QtCreator 4.15]
-
@idlefrog said in How to add exiting files to a CMake project?:
Or should we always manually edit our CMakeLists.txt files?
You have to add them manually. Adding them automatically isn't really possible since the list of sources can be gathered from everywhere.
-
@idlefrog said in How to add exiting files to a CMake project?:
Or should we always manually edit our CMakeLists.txt files?
You have to add them manually. Adding them automatically isn't really possible since the list of sources can be gathered from everywhere.
wrote on 11 Feb 2022, 11:29 last edited by@Christian-Ehrlicher Thank you for the help & quick response!
Now I've just got to understand why (after converting to cmake) I get the dreaded 'undefined reference to vtable for ...'
I did think just run 'cmake'... but no change...any ideas?
Sorry.. am a CMake beginner! -
@Christian-Ehrlicher Thank you for the help & quick response!
Now I've just got to understand why (after converting to cmake) I get the dreaded 'undefined reference to vtable for ...'
I did think just run 'cmake'... but no change...any ideas?
Sorry.. am a CMake beginner!@idlefrog Did you set AUTOMOC as suggested here: https://cmake.org/cmake/help/latest/prop_tgt/AUTOMOC.html ?
-
@idlefrog Did you set AUTOMOC as suggested here: https://cmake.org/cmake/help/latest/prop_tgt/AUTOMOC.html ?
-
Having converted to CMake. Does QtCreator allow you to add existing files to 'Sources'? This option is always greyed out from the project view context menu.
Or should we always manually edit our CMakeLists.txt files?[QtCreator 4.15]
wrote on 14 Jun 2023, 16:37 last edited by