From 6c12ffc902342fd70849371c241ea7b3819765bc Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Thu, 7 Nov 2013 18:22:44 +0100 Subject: [PATCH] Added the GLFW_BUILD_DOCS CMake option. --- CMakeLists.txt | 13 ++++++++----- README.md | 2 ++ docs/compile.dox | 3 +++ 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a698baa9..0a809003 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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(GLFW_BUILD_EXAMPLES "Build the GLFW example 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_DOCUMENT_INTERNALS "Include internals in documentation" OFF) @@ -73,11 +74,13 @@ endif() find_package(Threads REQUIRED) -set(DOXYGEN_SKIP_DOT TRUE) -find_package(Doxygen) +if (GLFW_BUILD_DOCS) + set(DOXYGEN_SKIP_DOT TRUE) + find_package(Doxygen) -if (GLFW_DOCUMENT_INTERNALS) - set(GLFW_INTERNAL_DOCS "${GLFW_SOURCE_DIR}/src/internal.h ${GLFW_SOURCE_DIR}/docs/internal.dox") + if (GLFW_DOCUMENT_INTERNALS) + set(GLFW_INTERNAL_DOCS "${GLFW_SOURCE_DIR}/src/internal.h ${GLFW_SOURCE_DIR}/docs/internal.dox") + endif() endif() #-------------------------------------------------------------------- @@ -407,7 +410,7 @@ if (GLFW_BUILD_TESTS) add_subdirectory(tests) endif() -if (DOXYGEN_FOUND) +if (DOXYGEN_FOUND AND GLFW_BUILD_DOCS) add_subdirectory(docs) endif() diff --git a/README.md b/README.md index 5ef35f17..7ebb8885 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,8 @@ guide in the GLFW documentation. ## 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 - 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 diff --git a/docs/compile.dox b/docs/compile.dox index 579f10a2..e57b6b26 100644 --- a/docs/compile.dox +++ b/docs/compile.dox @@ -149,6 +149,9 @@ along with the library. `GLFW_BUILD_TESTS` determines whether the GLFW test programs are 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