Blog.csdn.net/baimafujinj…
Firecat note:
I downloaded the version is V3.12.3, effective pro test. But not v2.8.12.2.
CMake is a more advanced cross-platform installation, build, and configuration tool than make. You can use a simple statement to describe the installation (build process) on all platforms. And generate the corresponding Makefile or project file depending on the platform and compiler. This article describes how to install and configure CMake on Mac OSX, the version of OSX I use is macOS Sierra.
First, you need to download the CMake installation file from the CMake website (cmake.org/download/)…
Once the download is complete, install it as you would a normal program under OS X. When you’re done, the CMake icon will appear on your Launchpad, as shown below.
Click on the icon above to open CMake’s GUI program. You may be prompted to select [Open] and the program will Open successfully.
After starting the program, select Tools from the menu bar, and then select “How to Install For Command Line Use” from the drop-down menu. A dialog box will pop up indicating How to configure the CMake Command to be used directly on the Command Line.
We’ll focus on the first two of these. First, if you type cmake –version on the command line, you will find that the system does not recognize the cmake command. Then use the first method given in the figure above, namely on the command line input PATH = “/ Applications/CMake. App/Contents/bin” : “$PATH”, as shown in the figure below. After that, execute the commands related to cmake and the system will recognize it correctly.
However, this method only works for a while (similar to Ubuntu). When you close a command line window and open another one, the system still does not recognize the cmake command. So let’s try a second approach. Type in a newly opened command line window (it is best to copy directly from CMake’s GUI dialog box to avoid typing errors)
sudo “/Applications/CMake.app/Contents/bin/cmake-gui” –install
At this point, open a new command line window again, and cmake is ready to run!
(this paper) — — — — — — — — — — — — — — — — — — — — – the author: white negative gold where source: CSDN, blog.csdn.net/baimafujinj… Copyright notice: This article is the blogger’s original article, reprint please attach the blog link!