Added the GLFW_BUILD_DOCS CMake option.

This commit is contained in:
Camilla Berglund 2013-11-07 18:22:44 +01:00
parent a83d257ac6
commit 6c12ffc902
3 changed files with 13 additions and 5 deletions

View File

@ -13,6 +13,7 @@ set(LIB_SUFFIX "" CACHE STRING "Takes an empty string or 64. Directory where lib
option(BUILD_SHARED_LIBS "Build shared libraries" OFF) option(BUILD_SHARED_LIBS "Build shared libraries" OFF)
option(GLFW_BUILD_EXAMPLES "Build the GLFW example programs" ON) option(GLFW_BUILD_EXAMPLES "Build the GLFW example programs" ON)
option(GLFW_BUILD_TESTS "Build the GLFW test programs" ON) option(GLFW_BUILD_TESTS "Build the GLFW test programs" ON)
option(GLFW_BUILD_DOCS "Build the GLFW documentation" ON)
option(GLFW_INSTALL "Generate installation target" ON) option(GLFW_INSTALL "Generate installation target" ON)
option(GLFW_DOCUMENT_INTERNALS "Include internals in documentation" OFF) option(GLFW_DOCUMENT_INTERNALS "Include internals in documentation" OFF)
@ -73,12 +74,14 @@ endif()
find_package(Threads REQUIRED) find_package(Threads REQUIRED)
if (GLFW_BUILD_DOCS)
set(DOXYGEN_SKIP_DOT TRUE) set(DOXYGEN_SKIP_DOT TRUE)
find_package(Doxygen) find_package(Doxygen)
if (GLFW_DOCUMENT_INTERNALS) if (GLFW_DOCUMENT_INTERNALS)
set(GLFW_INTERNAL_DOCS "${GLFW_SOURCE_DIR}/src/internal.h ${GLFW_SOURCE_DIR}/docs/internal.dox") set(GLFW_INTERNAL_DOCS "${GLFW_SOURCE_DIR}/src/internal.h ${GLFW_SOURCE_DIR}/docs/internal.dox")
endif() endif()
endif()
#-------------------------------------------------------------------- #--------------------------------------------------------------------
# Set compiler specific flags # Set compiler specific flags
@ -407,7 +410,7 @@ if (GLFW_BUILD_TESTS)
add_subdirectory(tests) add_subdirectory(tests)
endif() endif()
if (DOXYGEN_FOUND) if (DOXYGEN_FOUND AND GLFW_BUILD_DOCS)
add_subdirectory(docs) add_subdirectory(docs)
endif() endif()

View File

@ -31,6 +31,8 @@ guide in the GLFW documentation.
## Changelog ## Changelog
- Added the `GLFW_BUILD_DOCS` CMake option for controlling whether the
documentation is built
- Renamed configuration header to `glfw_config.h` to avoid conflicts - Renamed configuration header to `glfw_config.h` to avoid conflicts
- Bugfix: The `glfw3.pc` file did not respect the `LIB_SUFFIX` CMake option - Bugfix: The `glfw3.pc` file did not respect the `LIB_SUFFIX` CMake option
- [Win32] Bugfix: Removed joystick axis value negation left over from GLFW 2 - [Win32] Bugfix: Removed joystick axis value negation left over from GLFW 2

View File

@ -149,6 +149,9 @@ along with the library.
`GLFW_BUILD_TESTS` determines whether the GLFW test programs are `GLFW_BUILD_TESTS` determines whether the GLFW test programs are
built along with the library. built along with the library.
`GLFW_BUILD_DOCS` determines whether the GLFW documentation is built along with
the library.
@subsection compile_options_osx OS X specific CMake options @subsection compile_options_osx OS X specific CMake options