daw42/glslcookbook — pull request #13 by dangets (2013-10-27 11:58:51+00:00)
Title: Cmake copy dirs - for out of tree builds

In each of the chapter directory CMakeLists.txt I added the command ```file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/shader DESTINATION ${CMAKE_CURRENT_BINARY_DIR})``` and in the root CMakeLists.txt I did the same thing for the ```media``` directory

This allows for out-of-tree builds, which I believe is what issue #9 was referring to. Please double-check that this works on Windows (I'm on linux), that the copy doesn't seem to do anything if the directory already exists (e.g. in tree builds)

Also, in the root CMakeLists.txt I changed it to use find_package for GLFW and GLM. The original didn't work for me because on Arch Linux at least, glfw3 has completely replaced glfw2 and the libname is libglfw.so and isn't found when searching for libglfw3.so This change may also make the ```if( GLFW_SEARCH_PATH )``` blocks above not really do anything, but I left them in anyway. Again, please review and I can change stuff if needed.