Closed fayalalebrun closed 5 years ago
I've read over that article, and I've modified the code so it targets GLEW with the namespace version, as you suggested. I've tried to do this for the other libraries too, but I've been unable to find the cmake Find modules for them, where these variables are defined.
If you cannot find the CMake script, you can either make one or use the find_library
function. Probably the later is a simpler solution.
I've been having great difficulty with trying to use find_library. I can't figure what this function is looking for (The sources or a cmake file?). I am also worried that since I have to supply an absolute path to find_library, the multi-platform support of the project will suffer. But I will keep at it until I get it to work.
It looks like I've got it to work. GLM is a header-only library, and for that reason the libraries for it do not exist, and including the headers is enough. For GLFW, I've had to find the library as well as include the headers. I've also changed the Threads library to be linked with the namespace notation.
My only worry now is that for the include paths, I've used absolute paths, and I am not sure if that will translate well for Windows and OSX.
I've added Find Modules for GLM and GLFW. I've attached the licenses and the links where I found them inside of the module files.
I noticed that building failed while looking for the GLEW library with the new CMake file despite working fine with the old CMake file. Upon further investigation, I discovered that there was a capitalization mistake in the file that caused the GLEW library to not be linked correctly.