Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 2637


Ignore:
Timestamp:
Feb 2, 2009, 11:07:59 PM (16 years ago)
Author:
rgrieder
Message:

Adjustments to DocumentationTarget.cmake

Location:
code/branches/buildsystem2/cmake
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/buildsystem2/cmake/DocumentationTarget.cmake

    r2635 r2637  
    1818# author Jan Woetzel 2004-2006
    1919# www.mip.informatik.uni-kiel.de/~jw
     20# Adjustments for Orxonox by Reto Grieder
    2021
    21 
    22 FIND_PACKAGE(Doxygen)
     22FIND_PACKAGE(Doxygen QUIET)
    2323
    2424IF (DOXYGEN_FOUND)
    25 
    2625  # click+jump in Emacs and Visual Studio (for doxy.config) (jw)
    27   IF    (CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)")
     26  IF(CMAKE_BUILD_TOOL MATCHES "msdev|devenv")
    2827    SET(DOXY_WARN_FORMAT "\"$file($line) : $text \"")
    29   ELSE  (CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)")
     28  ELSE()
    3029    SET(DOXY_WARN_FORMAT "\"$file:$line: $text \"")
    31   ENDIF (CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)")
     30  ENDIF()
    3231 
    3332  # we need latex for doxygen because of the formulas
    34   FIND_PACKAGE(LATEX)
    35   IF    (NOT LATEX_COMPILER)
    36     MESSAGE(STATUS "latex command LATEX_COMPILER not found but usually required. You will probably get warnings and user inetraction on doxy run.")
    37   ENDIF (NOT LATEX_COMPILER)
    38   IF    (NOT MAKEINDEX_COMPILER)
    39     MESSAGE(STATUS "makeindex command MAKEINDEX_COMPILER not found but usually required.")
    40   ENDIF (NOT MAKEINDEX_COMPILER)
    41   IF    (NOT DVIPS_CONVERTER)
    42     MESSAGE(STATUS "dvips command DVIPS_CONVERTER not found but usually required.")
    43   ENDIF (NOT DVIPS_CONVERTER)
     33  # Orxonox doesn't
     34  #FIND_PACKAGE(LATEX)
     35  #IF    (NOT LATEX_COMPILER)
     36  #  MESSAGE(STATUS "latex command LATEX_COMPILER not found but usually required. You will probably get warnings and user inetraction on doxy run.")
     37  #ENDIF (NOT LATEX_COMPILER)
     38  #IF    (NOT MAKEINDEX_COMPILER)
     39  #  MESSAGE(STATUS "makeindex command MAKEINDEX_COMPILER not found but usually required.")
     40  #ENDIF (NOT MAKEINDEX_COMPILER)
     41  #IF    (NOT DVIPS_CONVERTER)
     42  #  MESSAGE(STATUS "dvips command DVIPS_CONVERTER not found but usually required.")
     43  #ENDIF (NOT DVIPS_CONVERTER)
    4444 
    45   IF   (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.in")
    46     MESSAGE(STATUS "configured ${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.in --> ${CMAKE_CURRENT_BINARY_DIR}/doxy.config")
    47     CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.in
    48       ${CMAKE_CURRENT_BINARY_DIR}/doxy.config
    49       @ONLY )
     45  IF(EXISTS ${CMAKE_SOURCE_DIR}/doxy.config.in)
     46    CONFIGURE_FILE(${CMAKE_SOURCE_DIR}/doxy.config.in ${CMAKE_BINARY_DIR}/doxy.config @ONLY)
    5047    # use (configured) doxy.config from (out of place) BUILD tree:
    51     SET(DOXY_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/doxy.config")
    52   ELSE (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.in")
    53     # use static hand-edited doxy.config from SOURCE tree:
    54     SET(DOXY_CONFIG "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config")
    55     IF   (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config")
    56       MESSAGE(STATUS "WARNING: using existing ${CMAKE_CURRENT_SOURCE_DIR}/doxy.config instead of configuring from doxy.config.in file.")
    57     ELSE (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config")
    58       IF   (EXISTS "${CMAKE_MODULE_PATH}/doxy.config.in")
    59         # using template doxy.config.in
    60         MESSAGE(STATUS "configured ${CMAKE_CMAKE_MODULE_PATH}/doxy.config.in --> ${CMAKE_CURRENT_BINARY_DIR}/doxy.config")
    61         CONFIGURE_FILE(${CMAKE_MODULE_PATH}/doxy.config.in
    62           ${CMAKE_CURRENT_BINARY_DIR}/doxy.config
    63           @ONLY )
    64         SET(DOXY_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/doxy.config")
    65       ELSE (EXISTS "${CMAKE_MODULE_PATH}/doxy.config.in")
    66         # failed completely...
    67         MESSAGE(SEND_ERROR "Please create ${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.in (or doxy.config as fallback)")
    68       ENDIF(EXISTS "${CMAKE_MODULE_PATH}/doxy.config.in")
    69 
    70     ENDIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config")
    71   ENDIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.in")
     48    SET(DOXY_CONFIG ${CMAKE_BINARY_DIR}/doxy.config)
     49  ELSE()
     50    MESSAGE(STATUS "Warning: Could not find dox.config.in in the root directory.")
     51  ENDIF()
    7252 
    7353  ADD_CUSTOM_TARGET(doc ${DOXYGEN_EXECUTABLE} ${DOXY_CONFIG})
     
    7656  # HTMLHelp DLL must be in path!
    7757  # fallback: use hhw.exe interactively
    78   IF    (WIN32)
     58  IF(WIN32)
    7959    FIND_PACKAGE(HTMLHelp)
    80     IF   (HTML_HELP_COMPILER)     
    81       SET (TMP "${CMAKE_CURRENT_BINARY_DIR}\\doc\\html\\index.hhp")
    82       STRING(REGEX REPLACE "[/]" "\\\\" HHP_FILE ${TMP} )
    83       # MESSAGE(SEND_ERROR "DBG  HHP_FILE=${HHP_FILE}")
    84       ADD_CUSTOM_TARGET(winhelp ${HTML_HELP_COMPILER} ${HHP_FILE})
    85       ADD_DEPENDENCIES (winhelp doc)
    86      
    87       IF (NOT TARGET_DOC_SKIP_INSTALL)
    88       # install windows help?
    89       # determine useful name for output file
    90       # should be project and version unique to allow installing
    91       # multiple projects into one global directory     
    92       IF   (EXISTS "${PROJECT_BINARY_DIR}/doc/html/index.chm")
    93         IF   (PROJECT_NAME)
    94           SET(OUT "${PROJECT_NAME}")
    95         ELSE (PROJECT_NAME)
    96           SET(OUT "Documentation") # default
    97         ENDIF(PROJECT_NAME)
    98         IF   (${PROJECT_NAME}_VERSION_MAJOR)
    99           SET(OUT "${OUT}-${${PROJECT_NAME}_VERSION_MAJOR}")
    100           IF   (${PROJECT_NAME}_VERSION_MINOR)
    101             SET(OUT  "${OUT}.${${PROJECT_NAME}_VERSION_MINOR}")
    102             IF   (${PROJECT_NAME}_VERSION_PATCH)
    103               SET(OUT "${OUT}.${${PROJECT_NAME}_VERSION_PATCH}")     
    104             ENDIF(${PROJECT_NAME}_VERSION_PATCH)
    105           ENDIF(${PROJECT_NAME}_VERSION_MINOR)
    106         ENDIF(${PROJECT_NAME}_VERSION_MAJOR)
    107         # keep suffix
    108         SET(OUT  "${OUT}.chm")
    109        
    110         #MESSAGE("DBG ${PROJECT_BINARY_DIR}/doc/html/index.chm \n${OUT}")
    111         # create target used by install and package commands
    112         INSTALL(FILES "${PROJECT_BINARY_DIR}/doc/html/index.chm"
    113           DESTINATION "doc"
    114           RENAME "${OUT}"
    115         )
    116       ENDIF(EXISTS "${PROJECT_BINARY_DIR}/doc/html/index.chm")
    117       ENDIF(NOT TARGET_DOC_SKIP_INSTALL)
    118 
     60    IF(HTML_HELP_COMPILER)     
     61      SET(TMP ${CMAKE_CURRENT_BINARY_DIR}/doc/html/index.hhp)
     62      STRING(REGEX REPLACE "/" "\\\\" HHP_FILE ${TMP})
     63      ADD_CUSTOM_TARGET(chmdoc ${HTML_HELP_COMPILER} ${HHP_FILE})
     64      IF(NOT MSVC)
     65        ADD_DEPENDENCIES(chmdoc doc)
     66      ELSE(NOT MSVC)
     67        # Do not add the dependency because msvc will then always build
     68        # Doxygen, which is not very comforting.
     69      ENDIF(NOT MSVC)
    11970    ENDIF(HTML_HELP_COMPILER)
    120     # MESSAGE(SEND_ERROR "HTML_HELP_COMPILER=${HTML_HELP_COMPILER}")
    12171  ENDIF (WIN32)
    12272ENDIF(DOXYGEN_FOUND)
  • code/branches/buildsystem2/cmake/LibraryConfig.cmake

    r2631 r2637  
    132132MARK_AS_ADVANCED(OPENAL_INCLUDE_DIR OPENAL_LIBRARY)
    133133
    134 ##### TCL #####
    135 # We only require TCL, so avoid confusing user about other TCL stuff by
     134##### Tcl #####
     135# We only require Tcl, so avoid confusing user about other Tcl stuff by
    136136# applying a little workaround
    137137SET(Tclsh_FIND_QUIETLY TRUE)
Note: See TracChangeset for help on using the changeset viewer.