From 8329c1baf99ece0e93feda1331e089bc0aced52e Mon Sep 17 00:00:00 2001 From: christian mueller Date: Wed, 6 Jul 2011 15:41:15 +0200 Subject: adding feature in the compile script: by adding document to the cmaker call , the documentation will be created. By default the documentation will not be created --- AudioManGUI/CMakeLists.txt | 3 +++ AudioManagerDaemon/CMakeLists.txt | 3 +++ PlayerGUI/CMakeLists.txt | 3 +++ PluginRoutingInterfaceDbus/CMakeLists.txt | 3 +++ PluginRoutingInterfaceJack/CMakeLists.txt | 3 +++ PluginStructuralTest/CMakeLists.txt | 3 +++ cmaker.sh | 14 ++++++++++++-- 7 files changed, 30 insertions(+), 2 deletions(-) diff --git a/AudioManGUI/CMakeLists.txt b/AudioManGUI/CMakeLists.txt index 27e41ba..305f612 100644 --- a/AudioManGUI/CMakeLists.txt +++ b/AudioManGUI/CMakeLists.txt @@ -8,6 +8,7 @@ set(STD_INCLUDE_DIRS "/usr/include") set(EXECUTABLE_OUTPUT_PATH ../../bin/) set(DBUS_FOLDER ${CMAKE_SOURCE_DIR}/../dbusInterfaces) set(DOC_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/../doc/AudioGui) +set(DOCUMENT $ENV{gendoc}) cmake_policy(SET CMP0015 NEW) @@ -89,8 +90,10 @@ add_custom_command( #add a target to generate API documentation with Doxygen find_package(Doxygen) if(DOXYGEN_FOUND) +if(DOCUMENT) configure_file(Doxyfile.in ${PROJECT_BINARY_DIR}/Doxyfile @ONLY IMMEDIATE) add_custom_target (Docs ALL COMMAND ${DOXYGEN_EXECUTABLE} ${PROJECT_BINARY_DIR}/Doxyfile WORKING_DIRECTORY ${DOC_OUTPUT_PATH} SOURCES ${PROJECT_BINARY_DIR}/Doxyfile) +endif(DOCUMENT) endif(DOXYGEN_FOUND) diff --git a/AudioManagerDaemon/CMakeLists.txt b/AudioManagerDaemon/CMakeLists.txt index 67da2e0..aa1460e 100644 --- a/AudioManagerDaemon/CMakeLists.txt +++ b/AudioManagerDaemon/CMakeLists.txt @@ -20,6 +20,7 @@ set(EXECUTABLE_OUTPUT_PATH ../../bin/) set(DOC_OUTPUT_PATH ../../doc/) set(DBUS_FOLDER ${CMAKE_SOURCE_DIR}/../dbusInterfaces) set(DOC_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/../doc/AudioManager) +set(DOCUMENT $ENV{gendoc}) cmake_policy(SET CMP0015 NEW) @@ -122,10 +123,12 @@ add_custom_command( #add a target to generate API documentation with Doxygen find_package(Doxygen) if(DOXYGEN_FOUND) +if(DOCUMENT) configure_file(Doxyfile.in ${PROJECT_BINARY_DIR}/Doxyfile @ONLY IMMEDIATE) add_custom_target (Docs ALL COMMAND ${DOXYGEN_EXECUTABLE} ${PROJECT_BINARY_DIR}/Doxyfile WORKING_DIRECTORY ${DOC_OUTPUT_PATH} SOURCES ${PROJECT_BINARY_DIR}/Doxyfile) +endif(DOCUMENT) endif(DOXYGEN_FOUND) diff --git a/PlayerGUI/CMakeLists.txt b/PlayerGUI/CMakeLists.txt index 336fa4d..cd3ce4c 100644 --- a/PlayerGUI/CMakeLists.txt +++ b/PlayerGUI/CMakeLists.txt @@ -8,6 +8,7 @@ set(STD_INCLUDE_DIRS "/usr/include") set(EXECUTABLE_OUTPUT_PATH ../../bin/) set(DBUS_FOLDER ${CMAKE_SOURCE_DIR}/../dbusInterfaces) set(DOC_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/../doc/PlayerGUI) +set(DOCUMENT $ENV{gendoc}) cmake_policy(SET CMP0015 NEW) @@ -104,10 +105,12 @@ add_custom_command( #add a target to generate API documentation with Doxygen find_package(Doxygen) if(DOXYGEN_FOUND) +if(DOCUMENT) configure_file(Doxyfile.in ${PROJECT_BINARY_DIR}/Doxyfile @ONLY IMMEDIATE) add_custom_target (Docs ALL COMMAND ${DOXYGEN_EXECUTABLE} ${PROJECT_BINARY_DIR}/Doxyfile WORKING_DIRECTORY ${DOC_OUTPUT_PATH} SOURCES ${PROJECT_BINARY_DIR}/Doxyfile) +endif(DOCUMENT) endif(DOXYGEN_FOUND) diff --git a/PluginRoutingInterfaceDbus/CMakeLists.txt b/PluginRoutingInterfaceDbus/CMakeLists.txt index ed15031..54f8e86 100644 --- a/PluginRoutingInterfaceDbus/CMakeLists.txt +++ b/PluginRoutingInterfaceDbus/CMakeLists.txt @@ -9,6 +9,7 @@ set(EXECUTABLE_OUTPUT_PATH ../../bin/) set(LIBRARY_OUTPUT_PATH ../plugins) set(DBUS_FOLDER ${CMAKE_SOURCE_DIR}/../dbusInterfaces) set(DOC_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/../doc/DBusPlugin) +set(DOCUMENT $ENV{gendoc}) cmake_policy(SET CMP0015 NEW) @@ -77,10 +78,12 @@ add_custom_command( #add a target to generate API documentation with Doxygen find_package(Doxygen) if(DOXYGEN_FOUND) +if(DOCUMENT) configure_file(Doxyfile.in ${PROJECT_BINARY_DIR}/Doxyfile @ONLY IMMEDIATE) add_custom_target (Docs ALL COMMAND ${DOXYGEN_EXECUTABLE} ${PROJECT_BINARY_DIR}/Doxyfile WORKING_DIRECTORY ${DOC_OUTPUT_PATH} SOURCES ${PROJECT_BINARY_DIR}/Doxyfile) +endif(DOCUMENT) endif(DOXYGEN_FOUND) diff --git a/PluginRoutingInterfaceJack/CMakeLists.txt b/PluginRoutingInterfaceJack/CMakeLists.txt index cbd3f38..083f492 100644 --- a/PluginRoutingInterfaceJack/CMakeLists.txt +++ b/PluginRoutingInterfaceJack/CMakeLists.txt @@ -8,6 +8,7 @@ set(STD_INCLUDE_DIRS "/usr/include") set(EXECUTABLE_OUTPUT_PATH ../../bin/) set(LIBRARY_OUTPUT_PATH ../plugins) set(DOC_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/../doc/JackPlugin) +set(DOCUMENT $ENV{gendoc}) cmake_policy(SET CMP0015 NEW) @@ -69,10 +70,12 @@ TARGET_LINK_LIBRARIES(RoutingJackPlugin #add a target to generate API documentation with Doxygen find_package(Doxygen) if(DOXYGEN_FOUND) +if(DOCUMENT) configure_file(Doxyfile.in ${PROJECT_BINARY_DIR}/Doxyfile @ONLY IMMEDIATE) add_custom_target (Docs ALL COMMAND ${DOXYGEN_EXECUTABLE} ${PROJECT_BINARY_DIR}/Doxyfile WORKING_DIRECTORY ${DOC_OUTPUT_PATH} SOURCES ${PROJECT_BINARY_DIR}/Doxyfile) +endif(DOCUMENT) endif(DOXYGEN_FOUND) diff --git a/PluginStructuralTest/CMakeLists.txt b/PluginStructuralTest/CMakeLists.txt index aae04c4..115408a 100644 --- a/PluginStructuralTest/CMakeLists.txt +++ b/PluginStructuralTest/CMakeLists.txt @@ -9,6 +9,7 @@ set(EXECUTABLE_OUTPUT_PATH ../../bin/) set(LIBRARY_OUTPUT_PATH ../plugins) set(DBUS_FOLDER ${CMAKE_SOURCE_DIR}/../dbusInterfaces) set(DOC_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/../doc/PluginTest) +set(DOCUMENT $ENV{gendoc}) cmake_policy(SET CMP0015 NEW) @@ -60,9 +61,11 @@ TARGET_LINK_LIBRARIES(TestPlugin #add a target to generate API documentation with Doxygen find_package(Doxygen) if(DOXYGEN_FOUND) +if(DOCUMENT) configure_file(Doxyfile.in ${PROJECT_BINARY_DIR}/Doxyfile @ONLY IMMEDIATE) add_custom_target (Docs ALL COMMAND ${DOXYGEN_EXECUTABLE} ${PROJECT_BINARY_DIR}/Doxyfile WORKING_DIRECTORY ${DOC_OUTPUT_PATH} SOURCES ${PROJECT_BINARY_DIR}/Doxyfile) +endif(DOCUMENT) endif(DOXYGEN_FOUND) diff --git a/cmaker.sh b/cmaker.sh index ca53478..df50919 100755 --- a/cmaker.sh +++ b/cmaker.sh @@ -213,14 +213,23 @@ all) ;; *) echo "" - echo " Usage: ./cmaker.sh {cmake|make|all} {all|main|plugins|target xxx}" + echo " Usage: ./cmaker.sh {cmake|make|all} {all|main|plugins|target xxx} [document]" echo " xxx stands for the directory of the target to be build" echo " Output binaries are below \bin, builds are done in \build\xxx" echo " Script does only use Subdirectories beginning with upper Cases !" + echo " document if this flag is present, the documentation will be created" echo "" exit 1 ;; esac +echo "$3" +doc="document" +if [ "$3" = "$doc" ] +then + export gendoc="ON" +else + export gendoc="OFF" +fi make_build case "$2" in all) @@ -237,10 +246,11 @@ target) ;; *) echo "" - echo " Usage: ./cmaker.sh {cmake|make|all} {all|applications|plugins|target xxx}" + echo " Usage: ./cmaker.sh {cmake|make|all} {all|applications|plugins|target xxx} [-document]" echo " xxx stands for the directory of the target to be build" echo " Output binaries are below \bin, builds are done in \build\xxx" echo " Script does only use Subdirectories beginning with upper Cases !" + echo " document if this flag is present, the documentation will be created" echo "" exit 1 ;; -- cgit v1.2.1