Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up CMake in a "recursive fashion" #19

Open
mirestrepo opened this issue May 4, 2021 · 1 comment
Open

Set up CMake in a "recursive fashion" #19

mirestrepo opened this issue May 4, 2021 · 1 comment

Comments

@mirestrepo
Copy link
Member

I may be wrong, but I think it is more common to set up CMake in a "recursive fashion", so your root CMakeLists.txt has something like

add_subdirectory(src)

and each subdirectory has it's own CMakeList that includes another directory or the sources....

See these links:
https://cliutils.gitlab.io/modern-cmake/chapters/basics/structure.html
https://gitlab.com/CLIUtils/modern-cmake/-/blob/master/examples/extended-project/CMakeLists.txt

How do you feel about that organization?

Originally posted by @mirestrepo in #17 (comment)

@kmilo9999
Copy link
Contributor

I would have to re arrange the folder structure to create small components.
for example, taking the current folder structure as example:

  • VR-VolumeViewer
    • src
      - VolumeVisualizationApp.cpp
    • include
      - VolumeVisualizationApp.h
    • libs
      • render
        • src
          • Volume.cpp
        • include
          • Volume.h
            - UI
        • src
          • UIView.cpp
            - include
          • UIView.h

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

No branches or pull requests

2 participants