How to use custom framework and change FRAMEWORK_DIR value

I am currently developing over a nucleo h723 because we want to upgrade from using the F4 family of stm32. We want to mantain the use of platformIO and libopencm3, but currently the framework doesn’t have full support on the stm32h723. So we did a fork from the libopencm3 repo and want to use that as a custom framework in order to develop the missing parts of the framework. But when I compile, platformIO searchs the files in the original directory of the libopencm3 framework instead of in the new one framework-libopencm3-stm32h7.

In the platformio.ini file we defined:
platform_packages = framework-libopencm3-stm32h7 @ ourprivaterepo/libopencm3.git#feat/STM32H7Support
framework = libopencm3