OpenGL cmake linmath.h no such file or directory

Hello everyone!
I’m using cmake with glfw, but when I write “make” it doesn’t work.
This is my CMakeLists.txt

CMAKE_MINIMUM_REQUIRED(VERSION 3.7)
PROJECT(project)
SET(CMAKE_CXX_STANDARD 11)
SET(CMAKE_BUILD_TYPE DEBUG)
set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
add_subdirectory(/home/andrey/Downloads/glfw /home/andrey/Downloads/glfw/src)
SET(SOURCE_FILES test.cpp)
ADD_EXECUTABLE(project ${SOURCE_FILES})
target_link_libraries(project glfw)
find_package(OpenGL REQUIRED)
target_link_libraries(project OpenGL::GL)

I used this tutorial to make the CMakeLists.txt above: GLFW: Building applications

I seen #include “linmath.h” in glfw example code. You should manually create it.

Here: glfw/linmath.h at master · glfw/glfw · GitHub

You will create a file called linmath.h in your project directory (where your main.c or your yourprogram.c located). Then copy paste the code inside linmath.h which is posted on github page.

You will include it as #include “linmath.h”
You will not do anything in cmake about it.

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.