# ********************************************************** # Copyright (c) 2012-2021 Google, Inc. All rights reserved. # Copyright (c) 2009-2010 VMware, Inc. All rights reserved. # ********************************************************** # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of source code must retain the above copyright notice, # this list of conditions and the following disclaimer. # # * Redistributions in binary form must reproduce the above copyright notice, # this list of conditions and the following disclaimer in the documentation # and/or other materials provided with the distribution. # # * Neither the name of VMware, Inc. nor the names of its contributors may be # used to endorse or promote products derived from this software without # specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE # ARE DISCLAIMED. IN NO EVENT SHALL VMWARE, INC. OR CONTRIBUTORS BE LIABLE # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT # LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY # OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH # DAMAGE. ########################################################################### # Usage: # + Add a custom command to invoke this script in the docs build dir # + Assumes a favicon.ico is present in the target build dir # # Args: # + DOXYGEN_EXECUTABLE : path to doxygen # + doxygen_ver : version of doxygen # + version_number : version number to put in the docs # + module_string_long : replacement text for Modules # + module_string_short : replacement text for Module # + files_string : replacement text for Files; optional # + structs_string : replacement text for Data Structures; optional # + home_url : home page URL # + home_title : home page title # + logo_imgfile : image file with logo # + embeddable : whether to edit content for jekyll embedding # + proj_srcdir : project base source dir, for editing titles # + proj_bindir : project base binary dir, for editing titles # ########################################################################### # Any quotes carry over and it's simplest to assume not there. string(REPLACE "\"" "" module_string_long ${module_string_long}) string(REPLACE "\"" "" module_string_short ${module_string_short}) if (DEFINED files_string) string(REPLACE "\"" "" files_string ${files_string}) endif () if (DEFINED structs_string) string(REPLACE "\"" "" structs_string ${structs_string}) endif () string(REPLACE "\"" "" home_url ${home_url}) string(REPLACE "\"" "" home_title ${home_title}) string(REPLACE "\"" "" logo_imgfile ${logo_imgfile}) # First, generate header.html and footer.html suitable for current # doxygen version and then tweak them. # Note that we must generate a css file and we must name it doxygen.css # or else we have to later copy it to html dir. execute_process(COMMAND ${DOXYGEN_EXECUTABLE} -w html header.html footer.html doxygen.css RESULT_VARIABLE doxygen_w_result ERROR_VARIABLE doxygen_w_error OUTPUT_QUIET ) if (doxygen_w_result OR doxygen_w_error) message(FATAL_ERROR "*** ${DOXYGEN_EXECUTABLE} failed: ***\n${doxygen_w_error}") endif (doxygen_w_result OR doxygen_w_error) # Add favicon to header file(READ ${CMAKE_CURRENT_BINARY_DIR}/header.html string) string(REGEX REPLACE "