-
Notifications
You must be signed in to change notification settings - Fork 5
Add STB and FileWatcher as Git submodules #21
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,3 +12,11 @@ | |
| [submodule "external/glm"] | ||
| path = external/glm | ||
| url = https://github.com/g-truc/glm.git | ||
| [submodule "external/stb"] | ||
| path = external/stb | ||
| url = https://github.com/nothings/stb.git | ||
| branch = master | ||
| [submodule "external/filewatch"] | ||
| path = external/filewatch | ||
| url = https://github.com/ThomasMonkman/filewatch.git | ||
| branch = master | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same here |
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yea you don't have to do this, just delete the files and let that be in the PR. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,67 @@ | ||
| # Submodule Migration Guide | ||
|
|
||
| ## Overview | ||
| This PR migrates STB and FileWatcher from direct file inclusion to Git submodules for better dependency management and version control. | ||
|
|
||
| ## Changes Made | ||
|
|
||
| ### 1. Added Git Submodules | ||
| - **STB**: Added as submodule from `https://github.com/nothings/stb.git` | ||
| - **FileWatcher**: Added as submodule from `https://github.com/ThomasMonkman/filewatch.git` | ||
|
|
||
| ### 2. Updated Build Configuration | ||
| - Modified `CMakeLists.txt` to include submodule paths | ||
| - Updated include directories to reference submodule locations | ||
|
|
||
| ## Migration Steps for Existing Users | ||
|
|
||
| If you have an existing clone of this repository, follow these steps: | ||
|
|
||
| ### 1. Remove Old Files | ||
| ```bash | ||
| # Remove the old standalone files | ||
| rm external/FileWatch.hpp | ||
| rm src/stb_image.h | ||
| ``` | ||
|
|
||
| ### 2. Initialize Submodules | ||
| ```bash | ||
| # Update .gitmodules | ||
| git pull origin main | ||
|
|
||
| # Initialize and update all submodules | ||
| git submodule update --init --recursive | ||
| ``` | ||
|
|
||
| ### 3. Verify Installation | ||
| After initialization, you should have: | ||
| - `external/stb/` directory with STB headers | ||
| - `external/filewatch/` directory with FileWatch headers | ||
|
|
||
| ### 4. Update Include Paths (if needed) | ||
| The CMakeLists.txt has been updated to include the new paths. If you have custom build scripts, update them to reference: | ||
| - `external/stb/` for STB headers | ||
| - `external/filewatch/` for FileWatch headers | ||
|
|
||
| ## For New Users | ||
|
|
||
| Simply clone with submodules: | ||
| ```bash | ||
| git clone --recursive https://github.com/CGS-IITKGP/OpenGL-template.git | ||
| ``` | ||
|
|
||
| Or if already cloned: | ||
| ```bash | ||
| git submodule update --init --recursive | ||
| ``` | ||
|
|
||
| ## Benefits | ||
|
|
||
| 1. **Version Control**: Track specific versions of dependencies | ||
| 2. **Consistency**: All external dependencies managed uniformly | ||
| 3. **Updates**: Easy to update to newer versions | ||
| 4. **Size**: Reduces repository size by not duplicating large header files | ||
|
|
||
| ## Fixes | ||
|
|
||
| Closes #17 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i dont think the branch is necessary
but it can stay ig