fixed: auto_ptr -> unique_ptr
[opensg.git] / Support / doxygen / CMakeLists.txt
blob78c23f53cf4883840acf5febbd6b38393d3945de
1 CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
3 FUNCTION(PROCESS_FILES SUBDIR FILES)
4   FOREACH(_DX_FILE ${${FILES}})
5     EXECUTE_PROCESS(
6       COMMAND "${CMAKE_COMMAND}" -E copy_if_different "${OSGDoxygenSrcDir}/${SUBDIR}/${_DX_FILE}"
7               "${CMAKE_BINARY_DIR}/External/doxygen/${SUBDIR}/")
8   ENDFOREACH()
9 ENDFUNCTION()
11 IF(OSGDoxygenSrcDir)
13   MESSAGE(STATUS "adding doxygen from : ${OSGDoxygenSrcDir}")
15   PROJECT(OSGDoxygen)
17   SET(OSG_DOXYGEN_DIRS "${CMAKE_BINARY_DIR}/External/doxygen"
18                        "${CMAKE_BINARY_DIR}/External/doxygen/build"
19                        "${CMAKE_BINARY_DIR}/External/doxygen/install")
21   FOREACH(_DX_DIR ${OSG_DOXYGEN_DIRS})
22     EXECUTE_PROCESS(
23         COMMAND "${CMAKE_COMMAND}" -E make_directory "${_DX_DIR}")
24   ENDFOREACH()
27 #  EXECUTE_PROCESS(
28 #    COMMAND "${CMAKE_COMMAND}" -E copy_directory "${OSGDoxygenSrcDir}/packages"
29 #            "${CMAKE_BINARY_DIR}/External/doxygen/packages")
31 #  EXECUTE_PROCESS(
32 #    COMMAND "${CMAKE_COMMAND}" -E copy_directory "${OSGDoxygenSrcDir}/tmake"
33 #            "${CMAKE_BINARY_DIR}/External/doxygen/tmake")
36   MESSAGE(STATUS "configure doxygen : ${OSGDoxygenSrcDir} with ${CMAKE_COMMAND}")
38   EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -DCMAKE_INSTALL_PREFIX:PATH=${CMAKE_BINARY_DIR}/External/doxygen/install ${OSGDoxygenSrcDir}
39                     OUTPUT_VARIABLE _CONFIGURE_DOXYGEN
40                     WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/External/doxygen/build")
42   MESSAGE(STATUS "${_CONFIGURE_DOXYGEN} configure doxygen : done")
44   ADD_CUSTOM_TARGET(doxygen ALL
45                     COMMAND make install
46                     WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/External/doxygen/build")
48   INSTALL(FILES "${CMAKE_BINARY_DIR}/External/doxygen/install/bin/doxygen"
49           DESTINATION bin/${OSG_LIBDIR_BUILD_TYPE_SUFFIX} 
50           COMPONENT development_tools
51           PERMISSIONS OWNER_WRITE OWNER_READ OWNER_EXECUTE
52                       GROUP_READ GROUP_EXECUTE
53                       WORLD_READ WORLD_EXECUTE)
56 ELSE(OSGDoxygenSrcDir)
58   MESSAGE(STATUS "ignored doxygen")
60   SET(OSGDoxygenSrcDir "" CACHE PATH "")
62 ENDIF(OSGDoxygenSrcDir)