Thursday, June 2, 2022

[SOLVED] How to Display extra files in QtCreator project tree (CMake-project)?

Issue

In qmake-project i can use OTHER_FILES += "android/AndroidManifest.xml" to display AndroidManifest.xml at QtCreator's project tree, how to do similar with CMake project?


Solution

You can use the add_custom_target in cmake. Example:

add_custom_target(android-related-files SOURCES "android/AndroidManifest.xml")

will show something like this:

add_custom_target result example



Answered By - Samuel Mira
Answer Checked By - Clifford M. (WPSolving Volunteer)