Is cmake source_group command supported in Android Studio

110 views
Skip to first unread message

jonlgre...@gmail.com

unread,
Oct 5, 2017, 9:24:32 AM10/5/17
to android-ndk
I want to see some structure for c++ source files and headers in Android Studio in the project pane. I was hoping to use the cmake source_group command in my CMakeLists.txt file, but it does not seem to have any effect. Is it supported? If so, could someone give me an example of how to use it? Thanks.

Alex Cohn

unread,
Oct 9, 2017, 1:09:29 PM10/9/17
to android-ndk
SOURCE_GROUP command is explicitly described in the docs as IDE helper, and the docs go even further to explain that this only works with Visual Studio. Android Studio has no relation to MSVC, and it ignores the SOURCE_GROUP commands in your CMakeLists.txt file.

Android Studio shows the c++ files grouped by their path (in Project view) or by their target (in Android view).

BR,
Alex Cohn
Reply all
Reply to author
Forward
0 new messages