Skip to content

Add examples to a common folder in visual studio - #107

Closed
TrevorCash wants to merge 1 commit into
mosra:masterfrom
TrevorCash:vs_examples_folder
Closed

Add examples to a common folder in visual studio#107
TrevorCash wants to merge 1 commit into
mosra:masterfrom
TrevorCash:vs_examples_folder

Conversation

@TrevorCash

Copy link
Copy Markdown
Contributor

Groups examples in a common folder on visual studio

@mosra mosra added this to the 2020.0b milestone Aug 9, 2023
@mosra

mosra commented Aug 9, 2023

Copy link
Copy Markdown
Owner

Thank you! Yeah I was lazy and did this for all other repositories except this one :)

I don't use VS myself and don't really remember how the project tree looks there but ... isn't grouping of all examples together too coarse? Or does VS itself make subfolders based on the executable?

If it makes subfolders then it's probably fine like this, and it'd be enough to have just a single

# IDE folder in VS, Xcode etc. CMake 3.12+, older versions have only the FOLDER
# property that would have to be set on each target separately.
set(CMAKE_FOLDER "MagnumExamples")

at the top of src/CMakeLists.txt. That'd do it the same way as in other projects.

@TrevorCash

TrevorCash commented Aug 9, 2023

Copy link
Copy Markdown
Contributor Author

As it is, it ends up creating 1 folder with all the example projects inside.

A single set(CMAKE_FOLDER "MagnumExamples") would probly be more maintainable (less code to add per new example)

@mosra

mosra commented Aug 9, 2023

Copy link
Copy Markdown
Owner

Can you screenshot it for me? :) Just so I have an idea how it looks like and how much worse it would get for VS in case someone would want subfolders instead. The FOLDER property is also doing similar grouping in Xcode, and there it behaves a bit different IIRC.

Thank you!

@TrevorCash

Copy link
Copy Markdown
Contributor Author

Heres my solution: (4 examples enabled) image

@mosra

mosra commented Aug 9, 2023

Copy link
Copy Markdown
Owner

Oh, that looks great actually, thanks.

I'll hunt for the MagnumPlugins-headers and fix it too. Let me know if there are any other similar orphans.

@mosra

mosra commented Aug 9, 2023

Copy link
Copy Markdown
Owner

Pushed as 74496c1, the loose MagnumPlugins-headers target is fixed in mosra/magnum-plugins@7a438d0.

Thank you!

@mosra mosra closed this Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants