E.g. you’re taking over an existing project and want to use NetBeans for it going forwards
Follow the instructions on this page, but jumping here once you get to the New NetBeans Project steps.
Creating A New NetBeans Project
Menu > File > New Project > Select ‘C/C++ Project with Existing Sources’
Selet the folder that contains your existing project files.
Leave the rest of the settings the default (Use Build Analyzer = YES, Configuration mode = Automatic)
NetBeans will run the cmake command to generate the Makefile and then build the project automatically.