Good Morning, i have started to work on my steam deck with visual studio code and cmake.
Unfortunately my setup do not work, GLFW can not be found.
I have this CMake File:
cmake_minimum_required(VERSION 3.5)
project(test)
# Set C++ standard
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# Include GLFW headers
include_directories(${CMAKE_SOURCE_DIR}/usr/include)
# Add executable
add_executable(test src/main.cpp)
# Link GLFW library to your executable
target_link_libraries(test ${CMAKE_SOURCE_DIR}/usr/lib/libglfw.so.3.3)
My error is:
[main] Building folder: game_engine
[build] Starting build
[proc] Executing command: /usr/bin/cmake --build /home/deck/Programming/game_engine/build --config Debug --target all --
[build] ninja: error: '/home/deck/Programming/game_engine/usr/lib/libglfw.so.3.3', needed by 'test', missing and no known rule to make it
[proc] The command: /usr/bin/cmake --build /home/deck/Programming/game_engine/build --config Debug --target all -- exited with code: 1
[driver] Build completed: 00:00:00.029
[build] Build finished with exit code 1
At the moment i do not know why my project can not find the GWFL Libary, maybe someone of you can help me.
Thanks in advance.
Further Information:
he following files in usr/lib/cmake/glfw3 :
glfw3Targets.cmake,
glfw3Targets-noconfig.cmake,
glfw3ConfigVersion.cmak,
glfw3Config.cmake
Also there are two header files in /usr/include/GLFW called:
glfw3.h
glfw3native.h
Also i have this so’s:
/usr/lib/libglfw.so
/usr/lib/libglfw.so.3
/usr/lib/libglfw.so.3.3
Permission of usr/lib/libglfw.so:
with following command: ls -l libglfw.so
lrwxrwxrwx 1 root root 12 Jul 23 2022 libglfw.so → libglfw.so.3
Permission is set to:
-rwxr-xr-x 1 root root 278200 Jul 23 2022 /usr/lib/libglfw.so.3.3
Permission of /usr/include/GLFW/glfw3.h:
-rw-r–r-- 1 root root 215860 Jul 23 2022 glfw3.h
Reinstalling with sudo pacman -S glfw-x11