Hi, 




The generation of the doxygen docs depends on libftdipp.


Libftdipp is not build is boost not found.


So cmake fails to build if doc is activated and c++ wrapper is not found.



I suggest to not rebuild automatically the doc each time, but once on demand.
Here is a patch doing that, otherwise consider removing the 'DEPENDS ftdi1 
ftdipp1' line as the doc is rebuilt anyway.

M.


   
                                          

--
libftdi - see http://www.intra2net.com/en/developer/libftdi for details.
To unsubscribe send a mail to [email protected]   

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 14911ad..5a3f3d7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -115,46 +115,25 @@ add_custom_target(dist
 
 
 # Documentation
-
-option(DOCUMENTATION "Generate API documentation with Doxygen" ON)
-
-
-find_package(Doxygen)
-if(DOCUMENTATION AND DOXYGEN_FOUND)
-
-   # Set variables
-   set(top_srcdir ${CMAKE_SOURCE_DIR})
-
-   # Find doxy config
-   message(STATUS "Doxygen found.")
-   set(DOXY_DIR "${CMAKE_SOURCE_DIR}/doc")
-   set(DOXY_CONFIG "${DOXY_DIR}/Doxyfile.in")
-
-   # Copy doxy.config.in
-   configure_file("${DOXY_CONFIG}" "${CMAKE_BINARY_DIR}/doxy.config")
-
-   # Create doc directory
-   add_custom_command(
-   OUTPUT ${CMAKE_BINARY_DIR}/doc
-   COMMAND rm -rf ${CMAKE_BINARY_DIR}/doc/{html,man}
-   COMMAND mkdir -p ${CMAKE_BINARY_DIR}/doc
-   DEPENDS ftdi1 ftdipp1
-   )
-
-   # Run doxygen
-   add_custom_command(
-   OUTPUT ${CMAKE_BINARY_DIR}/doc/html/index.html
-   COMMAND ${DOXYGEN_EXECUTABLE} "${CMAKE_BINARY_DIR}/doxy.config"
-   DEPENDS "${CMAKE_BINARY_DIR}/doxy.config" "${CMAKE_BINARY_DIR}/doc"
-   WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/doc
-   )
-
-   add_custom_target(docs ALL DEPENDS ${CMAKE_BINARY_DIR}/doc/html/index.html)
-
-   message(STATUS "Generating API documentation with Doxygen")
-else(DOCUMENTATION AND DOXYGEN_FOUND)
-   message(STATUS "Not generating API documentation")
-endif(DOCUMENTATION AND DOXYGEN_FOUND)
+find_package ( Doxygen )
+if ( DOXYGEN_FOUND )
+
+  # Configure Doxyfile
+  set ( top_srcdir ${CMAKE_SOURCE_DIR} )
+  configure_file( ${CMAKE_SOURCE_DIR}/doc/Doxyfile.in ${CMAKE_BINARY_DIR}/Doxyfile )
+
+  # Run doxygen
+  add_custom_target ( docs
+    COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_BINARY_DIR}/doc/{html,man}
+    COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_BINARY_DIR}/doc
+    COMMAND ${DOXYGEN_EXECUTABLE} ${CMAKE_BINARY_DIR}/Doxyfile
+    COMMENT "Doxygen documentation generation"
+  )
+  
+  message ( STATUS "Generating API documentation with Doxygen" )
+else ( DOXYGEN_FOUND )
+  message ( STATUS "Not generating API documentation" )
+endif ( DOXYGEN_FOUND )
 
 # PkgConfig
 set(prefix      ${CMAKE_INSTALL_PREFIX})
diff --git a/doc/Doxyfile.in b/doc/Doxyfile.in
index b5c45cc..7ccead3 100644
--- a/doc/Doxyfile.in
+++ b/doc/Doxyfile.in
@@ -51,7 +51,7 @@ PROJECT_LOGO           =
 # If a relative path is entered, it will be relative to the location
 # where doxygen was started. If left blank the current directory will be used.
 
-OUTPUT_DIRECTORY       =
+OUTPUT_DIRECTORY       = doc
 
 # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
 # 4096 sub-directories (in 2 levels) under the output directory of each output

Reply via email to