Skip to content

Some examples of how C++ projects can be structured with CMake.

Notifications You must be signed in to change notification settings

LiTHehack/cmake-examples

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

LiTHehacks CMake examples

Some simple examples of how to structure projects with CMake.

cd path/to/folder/containing/CMakeLists.txt

# it is good practice to generate Makefiles and project files in a build/ folder
mkdir build
cd build/

# run the CMakeLists.txt file located in the parent folder
# this command will produce a lot of output in the (current) build/ folder
# default build generator (on Unix systems) is Makefiles
cmake ..

# run the Makefile to compile the project
make

[...]

# Create build/CodeBlocks/ directory and run CMake with CodeBlocks project file generator
mkdir CodeBlocks
cd CodeBlocks
cmake -G CodeBlocks\ -\ Unix\ Makefiles ../..

About

Some examples of how C++ projects can be structured with CMake.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published