you haven’t shown how you actually define the target in question (there’s no add_library() or add_executable() command in the code you posted), so it’s next to impossible to say what’s wrong. Please try providing a minimised but complete CMakeList that would reproduced the issue.
I have now come to another problem with my CMakeList.txt file. I get the error
/usr/bin/ld: /home/stuv/projects/programming/cpp/bsAllrounder/out/Debug/lib/glad/lib/libglad.a(glad.c.o): undefined reference to symbol ‘dlclose@@GLIBC_2.2.5’
/usr/bin/ld: /usr/lib/gcc/x86_64-linux-gnu/10/…/…/…/x86_64-linux-gnu/libdl.so: error adding symbols: DSO missing from command line