Skip to content

Add CMake file to sort targets into folders#1383

Merged
jdumas merged 2 commits intodevfrom
jdumas/cmake-folders
Dec 14, 2019
Merged

Add CMake file to sort targets into folders#1383
jdumas merged 2 commits intodevfrom
jdumas/cmake-folders

Conversation

@jdumas
Copy link
Copy Markdown
Collaborator

@jdumas jdumas commented Dec 12, 2019

Make it easier on the eye for users on Visual Studio/Xcode:

projects

How it works is the user just needs to call set_igl_targets() after including libigl in their CMake script. The function is called by default if libigl is a toplevel project, and users will need to call it manually if they want to configure this while including libigl in another project.

I've also added header files to the GLOB pattern so that it shows in Visual Studio.

Check all that apply (change to [x])

@jdumas jdumas changed the base branch from master to dev December 12, 2019 23:34
@jdumas
Copy link
Copy Markdown
Collaborator Author

jdumas commented Dec 14, 2019

Making a note for myself: INTERFACE targets were never designed by CMake to represent header-only libraries, which is why they don't appear in the IDE (e.g., Visual Studio). See related CMake issue which will allow us to set the FOLDER property on INTERFACE targets in a future CMake version.

@jdumas jdumas merged commit ea05150 into dev Dec 14, 2019
@jdumas jdumas deleted the jdumas/cmake-folders branch December 14, 2019 20:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant