raysan5 / raylib

A simple and easy-to-use library to enjoy videogames programming

Home Page:http://www.raylib.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[build] CMake error trying to build examples

sakunix opened this issue · comments

Issue description

Trying to test the examples from the repository: https://github.com/raysan5/raylib/tree/master/examples

CMake Error at CMakeLists.txt:33 (add_if_flag_compiles): No cmake_minimum_required command is present. A line of code such as

Environment

openSUSE TW, CMAKE 3.29.3, IDE Kdevelop

Issue Screenshot

imagen

Code Example

does not have the line: cmake_minimum_required(VERSION 3.12)

You are not supposed to invoke cmake directly on that directory, but rather the root, and use -DBUILD_EXAMPLES=On.
I think this is user error.

commented

@sakunix I'm afraid I don't maintain the CMake build system, let's see if someone in the community could help on that.

You are not supposed to invoke cmake directly on that directory, but rather the root, and use -DBUILD_EXAMPLES=On. I think this is user error.

Thanks, in which line of the CMakeLists.txt file is that command inserted?

solucion:
imagen

The executables in the examples were created outside the directory where the code is.

imagen

imagen

@sakunix they get put in the directory you configured cmake in. That is normal, and expected.

@sakunix they get put in the directory you configured cmake in. That is normal, and expected.

Ok , thanks for the time, I'm new to cmake :D