Skip to content

kfjahnke/cmake-fetchcontent-tutorial-code

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is the source code for the Using CMake and managing dependencies.

It shows how to setup a simple project which depends on SFML, Dear ImGui and ImGui-SFML.

image

Building

git clone https://github.com/eliasdaler/cmake-fetchcontent-tutorial-code
mkdir build && cd build
cmake ../cmake-fetchcontent-tutorial-code
cmake --build .
./src/example_exe # or ./src/Debug/example_exe if using Visual Studio

Additional code was added to create a 'populate.sh' script in the project root which can reproduce the repo's directory tree somewhere else. The 'populate.sh' script is re-created whenever the project is built, it can be subsequently copied to the desired target location and executed there, recreating the tree without the need to use git. This is meant as an additional way of 'bootstrapping' a new repo with all the code 'on board' to successfully build the example code.

About

This is the code for the "Using CMake and managing dependencies" article from my blog

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CMake 40.9%
  • Shell 39.7%
  • C++ 19.4%