microsoft / vscode-embedded-tools

Official issue tracking repository for Microsoft's Embedded Tools VS Code extension.
MIT License
43 stars 3 forks source link

Auto update "target_include_directories" function in st-project.cmake file #48

Open alexandru-vrn opened 1 year ago

alexandru-vrn commented 1 year ago

I added a couple of .c and .h files in a newly created folder, as a custom library, at the same level with Core folder. When running the Create project from ST project command again, the source files are picked up and added to target_sources but the target_include_directories is not updated accordingly, so the build fails. I managed to fix this by creating a separate .cmake file with a function that includes these directory and add the call to that function in CMakeLists.txt. Would it be possible to update target_include_directories in the st-project.cmake file as well? Or is there a better way of handling such cases?