mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 21:14:35 +00:00
Add cache variable setting to source tree method
By default both tests, examples and documentation is built when the GLFW source tree is included in a larger CMake project.
This commit is contained in:
parent
22a09a53e6
commit
239ede725d
@ -158,7 +158,17 @@ build_link_cmake_module.
|
|||||||
With just a few changes to your `CMakeLists.txt` you can have the GLFW source
|
With just a few changes to your `CMakeLists.txt` you can have the GLFW source
|
||||||
tree built along with your application.
|
tree built along with your application.
|
||||||
|
|
||||||
Firstly, add the root directory of the GLFW source tree to your project. This
|
When including GLFW as part of your build, you probably don't want to build the
|
||||||
|
GLFW tests, examples and documentation. To disable these, set the corresponding
|
||||||
|
cache variables before adding the GLFW source tree.
|
||||||
|
|
||||||
|
@code
|
||||||
|
set(GLFW_BUILD_DOCS OFF CACHE BOOL "" FORCE)
|
||||||
|
set(GLFW_BUILD_TESTS OFF CACHE BOOL "" FORCE)
|
||||||
|
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
|
||||||
|
@endcode
|
||||||
|
|
||||||
|
Then add the root directory of the GLFW source tree to your project. This
|
||||||
will add the `glfw` target and the necessary cache variables to your project.
|
will add the `glfw` target and the necessary cache variables to your project.
|
||||||
|
|
||||||
@code{.cmake}
|
@code{.cmake}
|
||||||
|
Loading…
Reference in New Issue
Block a user