SFML community forums

Help => General => Topic started by: supernintendo64 on February 06, 2022, 05:42:18 pm

Title: "Unknown CMake command 'build_chapter'"
Post by: supernintendo64 on February 06, 2022, 05:42:18 pm
I'm trying to compile the example project files that came with the SFML Game Development book (the one with the ocean and rock on the cover). I'm using Visual Studio 2022. I went to "Open CMake" and ran the CMakeLists that was in the project directory and got an error on Line 6:

Code: [Select]
CMake Error at G:\[Name]\Documents\Packt\SFML Game Development\01_Intro\Source\CMakeLists.txt:6 (build_chapter): Unknown CMake command "build_chapter".

What am I doing wrong?
Title: Re: "Unknown CMake command 'build_chapter'"
Post by: eXpl0it3r on February 07, 2022, 08:21:28 am
You need to run the top-level CMake script, which is also the one that defines the build_chapter macro

https://github.com/SFML/SFML-Game-Development-Book/blob/master/CMakeLists.txt#L89