fixup! Add GLFW includes to target_include_directories

Update the documentation too.
This commit is contained in:
m@bitsnbites.eu 2016-02-01 12:30:48 +01:00
parent e5601f1619
commit 86e3697636

View File

@ -158,13 +158,6 @@ will add the `glfw` target and the necessary cache variables to your project.
add_subdirectory(path/to/glfw) add_subdirectory(path/to/glfw)
@endcode @endcode
To be able to include the GLFW header from your code, you need to tell the
compiler where to find it.
@code{.cmake}
include_directories(path/to/glfw/include)
@endcode
Once GLFW has been added to the project, the `GLFW_LIBRARIES` cache variable Once GLFW has been added to the project, the `GLFW_LIBRARIES` cache variable
contains all link-time dependencies of GLFW as it is currently configured. To contains all link-time dependencies of GLFW as it is currently configured. To
link against GLFW, link against them and the `glfw` target. link against GLFW, link against them and the `glfw` target.
@ -173,6 +166,8 @@ link against GLFW, link against them and the `glfw` target.
target_link_libraries(myapp glfw ${GLFW_LIBRARIES}) target_link_libraries(myapp glfw ${GLFW_LIBRARIES})
@endcode @endcode
This also makes the GLFW header available for inclusion from your code.
Note that `GLFW_LIBRARIES` does not include GLU, as GLFW does not use it. If Note that `GLFW_LIBRARIES` does not include GLU, as GLFW does not use it. If
your application needs GLU, you can add it to the list of dependencies with the your application needs GLU, you can add it to the list of dependencies with the
`OPENGL_glu_LIBRARY` cache variable, which is implicitly created when the GLFW `OPENGL_glu_LIBRARY` cache variable, which is implicitly created when the GLFW