added doxygen doc generation option
authorKevron Rees <kevron.m.rees@intel.com>
Fri, 11 Oct 2013 22:40:19 +0000 (15:40 -0700)
committerKevron Rees <kevron.m.rees@intel.com>
Fri, 11 Oct 2013 22:40:19 +0000 (15:40 -0700)
CMakeLists.txt
Doxyfile.in [new file with mode: 0644]
docs/CMakeLists.txt
plugins/dbus/dbusinterfacemanager.cpp

index 2804b65..5ee9627 100644 (file)
@@ -33,7 +33,8 @@ option(test_plugin "Test Plugin" ON)
 option(bluemonkey_plugin "bluemonkey irc plugin" OFF)
 option(gpsnmea_plugin "gps NMEA location plugin" OFF)
 option(openxc_plugin "OpenXC plugin" OFF)
-
+option(enable_icecc "Enable icecc checking, for distributed compilation" ON)
+option(enable_docs "enable Doxygen doc generation" OFF)
 
 if(opencvlux_plugin)
    message(STATUS "OpenCV Lux plugin enabled")
@@ -41,9 +42,8 @@ if(opencvlux_plugin)
 endif(opencvlux_plugin)
 
 include (CMakeForceCompiler)
-option(ENABLE_ICECC "Enable icecc checking, for distributed compilation" ON)
 
-if (ENABLE_ICECC)
+if (enable_icecc)
    find_program(ICECC /usr/lib/icecc/bin/g++)
     if (ICECC)
         message(STATUS "icecc will be used for distributed compiling")
@@ -51,7 +51,18 @@ if (ENABLE_ICECC)
     else(ICECC)
         message(STATUS "Not using icecc")
     endif(ICECC)
-endif(ENABLE_ICECC)
+endif(enable_icecc)
+
+# add a target to generate API documentation with Doxygen
+if(enable_docs)
+message(STATUS "doxygen doc generation enabled")
+find_package(Doxygen)
+if(DOXYGEN_FOUND)
+       configure_file(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile @ONLY)
+       add_custom_target(all ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/docs COMMENT "Generating API documentation with Doxygen" VERBATIM)
+
+endif(DOXYGEN_FOUND)
+endif(enable_docs)
 
 find_library(libtool_LIBRARY ltdl DOC "Libtool libraries")
 find_path(libtool_INCLUDE_DIR ltdl.h DOC "Libtool headers")
diff --git a/Doxyfile.in b/Doxyfile.in
new file mode 100644 (file)
index 0000000..7d06937
--- /dev/null
@@ -0,0 +1,3 @@
+PROJECT_NAME = @PROJECT_NAME@
+PROJECT_NUMBER = @PROJECT_VERSION@
+INPUT = @CMAKE_CURRENT_SOURCE_DIR@/lib/ @CMAKE_CURRENT_SOURCE_DIR@/docs
index 52f3213..cfc0279 100644 (file)
@@ -1,3 +1,7 @@
 set(amb_docs drivingsafety.txt electricvehicle.txt environment.txt maintenance.txt parking.txt personalization.txt runningstatus.txt vehicleinfo.txt)
 
-install (FILES ${amb_docs} DESTINATION ${DOC_INSTALL_DIR} COMPONENT Docs)
\ No newline at end of file
+install (FILES ${amb_docs} DESTINATION ${DOC_INSTALL_DIR} COMPONENT Docs)
+
+if(enable_docs)
+  install (DIRECTORY html DESTINATION ${DOC_INSTALL_DIR} COMPONENT Docs)
+endif(enable_docs)
index 71e4032..488e459 100644 (file)
@@ -106,7 +106,7 @@ void exportProperty(AbstractRoutingEngine *re, GDBusConnection *connection)
                        t->setObjectPath(fullobjectPath.str());
                        t->setSourceFilter(source);
                        t->setZoneFilter(zone);
-                       t->unregisterObject();
+                       //t->unregisterObject();
                        t->supportedChanged(re->supported());
                }
 
@@ -146,7 +146,7 @@ void exportProperty(VehicleProperty::Property prop, AbstractRoutingEngine *re, G
                        t->setObjectPath(fullobjectPath.str());
                        t->setSourceFilter(source);
                        t->setZoneFilter(zone);
-                       t->unregisterObject();
+                       //t->unregisterObject();
                        t->supportedChanged(re->supported());
                }