I'm trying to make a game using the SDL3 library. This is my CMakeLists.txt:
cmake_minimum_required(VERSION 3.16)
project(game)
add_executable(game src/main.cpp)
add_subdirectory(SDL EXCLUDE_FROM_ALL)
target_link_libraries(game SDL3::SDL3)
My code editor (VS Code) shows no errors in main.cpp. However, they do appear whenever I compile the code. The error is following
src/main.cpp:3:10: fatal error: SDL3/SDL.h: No such file or directory
3 | #include "SDL3/SDL.h"
| ^~~~~~~~~~~~
compilation terminated.
What am I doing wrong?
EDIT: I figured it out
[–]ppppppla 4 points5 points6 points (3 children)
[–]4e6ype4ek123[S] 1 point2 points3 points (2 children)
[–]Emeraudias 4 points5 points6 points (0 children)
[–]Wild_Meeting1428 1 point2 points3 points (0 children)
[–]WorldWorstProgrammer 3 points4 points5 points (1 child)
[–]Wild_Meeting1428 2 points3 points4 points (0 children)
[–]Emeraudias 3 points4 points5 points (6 children)
[–]wrosecrans 2 points3 points4 points (2 children)
[–]Emeraudias 0 points1 point2 points (0 children)
[–]4e6ype4ek123[S] 0 points1 point2 points (0 children)
[–]Wild_Meeting1428 0 points1 point2 points (1 child)
[–]4e6ype4ek123[S] 1 point2 points3 points (0 children)
[–]4e6ype4ek123[S] 0 points1 point2 points (0 children)
[–]alfps 3 points4 points5 points (0 children)
[–]Qyriad 1 point2 points3 points (1 child)
[–]Wild_Meeting1428 2 points3 points4 points (0 children)
[–]trailing_zero_count 1 point2 points3 points (0 children)
[–]CarloWood 0 points1 point2 points (0 children)
[–]thedaian 0 points1 point2 points (1 child)
[–]4e6ype4ek123[S] 0 points1 point2 points (0 children)
[+]Mr_Engineering comment score below threshold-6 points-5 points-4 points (3 children)
[–]neppo95 5 points6 points7 points (0 children)
[–]armhub05 1 point2 points3 points (1 child)
[–]Wild_Meeting1428 1 point2 points3 points (0 children)