Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
140 views
in Technique[技术] by (71.8m points)

c++ - Why isn't the command "cmake ." generating a makefile?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

It seems CMake defaults to generating an XCode project on Mac. CMake generated freeglut.xcodeproj along with all supporting files.

You are better off running cmake from an empty directory, so you can see what it actually does when it is run.

To generate a makefile (and create a build directory), do

mkdir -p cmake-build && cd cmake-build
cmake .. -G"Unix Makefiles"

Then it should generate a Makefile.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...