How to build and upload a project using HAL of stm32CubeMX

Hi, can someone help me to modify or guide me how I can build a project that uses HAL libraries? I used cmake file to build in Clion, can use this file on platformio?