To make Apache NetBeans cooperate with CMake projects on your Mac it requires just a few extra steps. CMake used to have a tool to do this for you, but now navigating in CMake to Tools->How to Install for Command Line Use shows you this:

I’m going to chose the symlink option, open up the Terminal App and type:
sudo "/Applications/CMake.app/Contents/bin/cmake-gui" --install

Now that CMake is properly installed to the command line tool chain, open up NetBeans and go to the Preferences and click on the C/C++ tab. Enter the newly created symlink path /usr/local/bin/cmake for the CMake Command and click apply:

Now navigate to File->New Project. Choose C/C++ Project with Existing Sources and click next:

Browse to find your project root directory containing the CMakeLists.txt file, and everything should be good to go, just click finish!

NetBeans should run CMake to generate the Makefile, and should you edit your CMakeLists.txt file, just right-click the CMakeLists.txt file in the project tree and select Generate Makefile to generate a fresh one. All done and good to go! Happy coding!
[…] NetBeans is currently my go-to IDE for C/C++ and PHP projects, since I have been using it for many many years and have had zero problems! Next week I begin Java classes for school… I will try out Eclipse and IntelliJ IDEA to see how they compare for Java programming and report back. If you don’t know the differences I will sum it up: NetBeans is the official Java IDE which was recently taken over by Apache (previously owned/developed by Sun – the creators of Java,) Eclipse is the most commonly used Java IDE, and IntelliJ IDEA has both paid and free versions which was used as the basis for Android Studio. Alternatively, for C/C++ projects I enjoy coding the old fashioned way with Sublime Text for my text editor and CMake for cross platform makefile generation. For using CMake with NetBeans see this article. […]