# Build QGC using custom submodule branch

**URL:** <https://discuss.px4.io/t/build-qgc-using-custom-submodule-branch/44960>\
**Category:** Development\
**Created:** [April 10, 2025, 1:59pm UTC](https://discuss.px4.io/t/build-qgc-using-custom-submodule-branch/44960 "2025-04-10T13:59:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Louismax](https://discuss.px4.io/user_avatar/discuss.px4.io/louismax/32/18925_2.png) [@Louismax](https://discuss.px4.io/u/Louismax)\
**Post date:** [April 10, 2025, 1:59pm UTC](https://discuss.px4.io/t/build-qgc-using-custom-submodule-branch/44960/1 "2025-04-10T13:59:02Z")

</div>

Hi 👋

I need to build QGC from source using a custom repo/branch for GSP drivers.  
You can find out how I do it below, I don’t think it’s the most efficient way to proceed but we’re here to discuss it 😃

I have changed the makefile to set my own repo :

```auto
include(CPM)
CPMAddPackage(
    NAME px4-gpsdrivers
    GITHUB_REPOSITORY Louis-max-H/PX4-GPSDrivers
    GIT_TAG pr-base
    SOURCE_SUBDIR src
)

```

It works well, but if I made a change to my branch, it seems I need to delete the build/ directory to refresh the result, and build again the whole project.

Actually, I am editing directly files in  
`build/cpm_modules/px4-gpsdrivers/ccfdbb49177cbc391dab9c11c763e23d4fb6a4a0/src/`.  
And then, build QGC has usual using :

```auto
docker run --privileged --rm -v ${PWD}:/project/source -v ${PWD}/build:/project/build qgc-linux-docker

```

I just need root permission to edit files, and I copy past changes to GPS driver repo when I am done editing my files.

Feel free to share your workflow here 😉
