Browse Source

always enable documentation build but needs to be invoked manually

Julius Pfrommer 7 years ago
parent
commit
f2b1cf8c2f
3 changed files with 10 additions and 13 deletions
  1. 3 5
      CMakeLists.txt
  2. 3 1
      doc/CMakeLists.txt
  3. 4 7
      doc/building.rst

+ 3 - 5
CMakeLists.txt

@@ -90,7 +90,6 @@ endif()
 # Build Targets
 option(UA_BUILD_EXAMPLES "Build example servers and clients" OFF)
 option(UA_BUILD_UNIT_TESTS "Build the unit tests" OFF)
-option(UA_BUILD_DOCUMENTATION "Generate doxygen/sphinx documentation" OFF)
 option(UA_BUILD_EXAMPLES_NODESET_COMPILER "Generate an OPC UA information model from a nodeset XML (experimental)" OFF)
 
 # Advanced Build Targets
@@ -408,6 +407,9 @@ endif()
 # Build Selected Targets #
 ##########################
 
+# always include, builds with make doc
+add_subdirectory(doc)
+
 if(UA_BUILD_EXAMPLES)
     add_subdirectory(examples)
 endif()
@@ -418,10 +420,6 @@ if(UA_BUILD_UNIT_TESTS)
     add_subdirectory(tests)
 endif()
 
-if(UA_BUILD_DOCUMENTATION)
-    add_subdirectory(doc)
-endif()
-
 if(UA_BUILD_EXAMPLES_NODESET_COMPILER)
   add_custom_target(generate_informationmodel ALL
                     DEPENDS ${PROJECT_BINARY_DIR}/src_generated/nodeset.h ${PROJECT_BINARY_DIR}/src_generated/nodeset.c)

+ 3 - 1
doc/CMakeLists.txt

@@ -1,4 +1,4 @@
-find_package(Sphinx REQUIRED)
+find_package(Sphinx)
 find_package(LATEX)
 
 set(DOC_LATEX_DIR ${PROJECT_BINARY_DIR}/doc_latex)
@@ -82,3 +82,5 @@ add_custom_target(doc ${SPHINX_EXECUTABLE}
           ${DOC_SRC_DIR}/tutorial_server_method.rst
   COMMENT "Building HTML documentation with Sphinx")
 add_dependencies(doc open62541)
+
+set_target_properties(doc doc_latex doc_pdf PROPERTIES EXCLUDE_FROM_DEFAULT_BUILD TRUE)

+ 4 - 7
doc/building.rst

@@ -40,6 +40,10 @@ Building with CMake on Ubuntu or Debian
    ccmake ..
    make
 
+   # build documentation
+   make doc # html documentation
+   make doc_pdf # pdf documentation (requires LaTeX)
+
 Building with CMake on Windows
 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 
@@ -145,13 +149,6 @@ By default only the shared object libopen62541.so or the library open62541.dll
 and open62541.dll.a resp. open62541.lib are build. Additional artifacts can be
 specified by the following options:
 
-**UA_BUILD_DOCUMENTATION**
-  Generate Make targets for documentation
-
-   * HTML documentation: ``make doc``
-   * Latex Files: ``latex``
-   * PDF documentation: ``make pdf``
-
 **UA_BUILD_EXAMPLES**
    Compile example servers and clients from :file:`examples/{xyz}.c`. A static and a dynamic binary is linked, respectively.