Skip to content

Commit

Permalink
always enable documentation build but needs to be invoked manually
Browse files Browse the repository at this point in the history
  • Loading branch information
jpfr committed Mar 5, 2017
1 parent 5c0f648 commit 92183bf
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
8 changes: 3 additions & 5 deletions CMakeLists.txt
Expand Up @@ -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
Expand Down Expand Up @@ -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()
Expand All @@ -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)
Expand Down
4 changes: 3 additions & 1 deletion 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)
Expand Down Expand Up @@ -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)
11 changes: 4 additions & 7 deletions doc/building.rst
Expand Up @@ -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
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down Expand Up @@ -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.

Expand Down

0 comments on commit 92183bf

Please sign in to comment.