I would like to build GLFW with CMake on OSX, no XCode, no Visual Studio etc. The purpose is to have GLFW in a custom location where I can link it against any of my projects.
So I downloaded the *.zip file and extracted it inside:
Then I created a build folder inside the folder listed above, and within that folder I have executed the following command:
cmake -S /Users/me/.tmp/glfw-3.3.6 -B /Users/me/.tmp/glfw-3.3.6/build
Which seems to have worked, as I did not get any errors. Then I have executed:
And that also seems to have worked, no errors. But that is where the instructions in the documentation section of GLFW end.
Where are the header files and the library files to link against?
With a last bit of desperation, I typed
make install and the process chucked bunch of files into
/usr/local which was definitely the one thing I didn’t want to happen!
-- Installing: /usr/local/lib/libglfw3.a -- Installing: /usr/local/include/GLFW -- Installing: /usr/local/include/GLFW/glfw3.h -- Installing: /usr/local/include/GLFW/glfw3native.h -- Installing: /usr/local/lib/cmake/glfw3/glfw3Config.cmake -- Installing: /usr/local/lib/cmake/glfw3/glfw3ConfigVersion.cmake -- Installing: /usr/local/lib/cmake/glfw3/glfw3Targets.cmake -- Installing: /usr/local/lib/cmake/glfw3/glfw3Targets-noconfig.cmake -- Installing: /usr/local/lib/pkgconfig/glfw3.pc
Is that it? I wanted to have GLFW in my custom location but there is nothing about this in the documentation?