diff options
Diffstat (limited to 'attic/muse2-oom/muse2/cmake')
-rw-r--r-- | attic/muse2-oom/muse2/cmake/Summary.cmake | 28 | ||||
-rw-r--r-- | attic/muse2-oom/muse2/cmake/TargetDoc.cmake | 125 | ||||
-rw-r--r-- | attic/muse2-oom/muse2/cmake/UsePkgConfig1.cmake | 45 | ||||
-rw-r--r-- | attic/muse2-oom/muse2/cmake/WrapMacros.cmake | 14 | ||||
-rw-r--r-- | attic/muse2-oom/muse2/cmake/cmake_uninstall.cmake.in | 23 |
5 files changed, 235 insertions, 0 deletions
diff --git a/attic/muse2-oom/muse2/cmake/Summary.cmake b/attic/muse2-oom/muse2/cmake/Summary.cmake new file mode 100644 index 00000000..2dc94eb2 --- /dev/null +++ b/attic/muse2-oom/muse2/cmake/Summary.cmake @@ -0,0 +1,28 @@ +set(summary_willbuild "") +set(summary_willnotbuild "") + +macro(summary_add name test) + if (${test}) + list(APPEND summary_willbuild ${name}) + else (${test}) + list(APPEND summary_willnotbuild "${name}") + endif (${test}) +endmacro(summary_add) + +macro(summary_show_part variable title) + list(LENGTH ${variable} _len) + if (_len) + message("") + message(${title}) + message("-----------------------------------------------") + foreach (_item ${${variable}}) + message(" ${_item}") + endforeach (_item) + endif (_len) +endmacro(summary_show_part) + +macro(summary_show) + summary_show_part(summary_willbuild "The following components will be built:") + summary_show_part(summary_willnotbuild "The following components WILL NOT be built:") + message("") +endmacro(summary_show) diff --git a/attic/muse2-oom/muse2/cmake/TargetDoc.cmake b/attic/muse2-oom/muse2/cmake/TargetDoc.cmake new file mode 100644 index 00000000..e6afb583 --- /dev/null +++ b/attic/muse2-oom/muse2/cmake/TargetDoc.cmake @@ -0,0 +1,125 @@ +# -helper macro to add a "doxy" target with CMake build system. +# and configure Doxyfile.in to Doxyfile +# +# target "doxy" allows building the documentation with doxygen/dot on WIN32 and Linux +# Creates .chm windows help file if MS HTML help workshop +# (available from http://msdn.microsoft.com/workshop/author/htmlhelp) +# is installed with its DLLs in PATH. +# +# +# Please note, that the tools, e.g.: +# doxygen, dot, latex, dvips, makeindex, gswin32, etc. +# must be in path. +# +# Note about Visual Studio Projects: +# MSVS hast its own path environment which may differ from the shell. +# See "Menu Tools/Options/Projects/VC++ Directories" in VS 7.1 +# +# author Jan Woetzel 2004-2006 +# www.mip.informatik.uni-kiel.de/~jw + +FIND_PACKAGE(Doxygen) + +IF (DOXYGEN) + + MESSAGE("found Doxygen") + + # click+jump in Emacs and Visual Studio (for Doxyfile) (jw) + IF (CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)") + SET(DOXY_WARN_FORMAT "\"$file($line) : $text \"") + ELSE (CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)") + SET(DOXY_WARN_FORMAT "\"$file:$line: $text \"") + ENDIF (CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)") + + # we need latex for doxygen because of the formulas + FIND_PACKAGE(LATEX) + IF (NOT LATEX_COMPILER) + MESSAGE(STATUS "latex command LATEX_COMPILER not found but usually required. You will probably get warnings and user inetraction on doxy run.") + ENDIF (NOT LATEX_COMPILER) + IF (NOT MAKEINDEX_COMPILER) + MESSAGE(STATUS "makeindex command MAKEINDEX_COMPILER not found but usually required.") + ENDIF (NOT MAKEINDEX_COMPILER) + IF (NOT DVIPS_CONVERTER) + MESSAGE(STATUS "dvips command DVIPS_CONVERTER not found but usually required.") + ENDIF (NOT DVIPS_CONVERTER) + + IF (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in") + MESSAGE(STATUS "configured ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in --> ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile") + CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in + ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile + @ONLY ) + # use (configured) Doxyfile from (out of place) BUILD tree: + SET(DOXY_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile") + ELSE (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in") + # use static hand-edited Doxyfile from SOURCE tree: + SET(DOXY_CONFIG "${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile") + IF (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile") + MESSAGE(STATUS "WARNING: using existing ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile instead of configuring from Doxyfile.in file.") + ELSE (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile") + IF (EXISTS "${CMAKE_MODULE_PATH}/Doxyfile.in") + # using template Doxyfile.in + MESSAGE(STATUS "configured ${CMAKE_CMAKE_MODULE_PATH}/Doxyfile.in --> ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile") + CONFIGURE_FILE(${CMAKE_MODULE_PATH}/Doxyfile.in + ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile + @ONLY ) + SET(DOXY_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/Doxyfile") + ELSE (EXISTS "${CMAKE_MODULE_PATH}/Doxyfile.in") + # failed completely... + MESSAGE(SEND_ERROR "Please create ${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in (or Doxyfile as fallback)") + ENDIF(EXISTS "${CMAKE_MODULE_PATH}/Doxyfile.in") + + ENDIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile") + ENDIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/Doxyfile.in") + + ADD_CUSTOM_TARGET(doxy ${DOXYGEN} ${DOXY_CONFIG}) + + # create a windows help .chm file using hhc.exe + # HTMLHelp DLL must be in path! + # fallback: use hhw.exe interactively + IF (WIN32) + FIND_PACKAGE(HTMLHelp) + IF (HTML_HELP_COMPILER) + SET (TMP "${CMAKE_CURRENT_BINARY_DIR}\\Doc\\html\\index.hhp") + STRING(REGEX REPLACE "[/]" "\\\\" HHP_FILE ${TMP} ) + # MESSAGE(SEND_ERROR "DBG HHP_FILE=${HHP_FILE}") + ADD_CUSTOM_TARGET(winhelp ${HTML_HELP_COMPILER} ${HHP_FILE}) + ADD_DEPENDENCIES (winhelp doxy) + + IF (NOT TARGET_DOC_SKIP_INSTALL) + # install windows help? + # determine useful name for output file + # should be project and version unique to allow installing + # multiple projects into one global directory + IF (EXISTS "${PROJECT_BINARY_DIR}/Doc/html/index.chm") + IF (PROJECT_NAME) + SET(OUT "${PROJECT_NAME}") + ELSE (PROJECT_NAME) + SET(OUT "Documentation") # default + ENDIF(PROJECT_NAME) + IF (${PROJECT_NAME}_VERSION_MAJOR) + SET(OUT "${OUT}-${${PROJECT_NAME}_VERSION_MAJOR}") + IF (${PROJECT_NAME}_VERSION_MINOR) + SET(OUT "${OUT}.${${PROJECT_NAME}_VERSION_MINOR}") + IF (${PROJECT_NAME}_VERSION_PATCH) + SET(OUT "${OUT}.${${PROJECT_NAME}_VERSION_PATCH}") + ENDIF(${PROJECT_NAME}_VERSION_PATCH) + ENDIF(${PROJECT_NAME}_VERSION_MINOR) + ENDIF(${PROJECT_NAME}_VERSION_MAJOR) + # keep suffix + SET(OUT "${OUT}.chm") + + #MESSAGE("DBG ${PROJECT_BINARY_DIR}/Doc/html/index.chm \n${OUT}") + # create target used by install and package commands + INSTALL(FILES "${PROJECT_BINARY_DIR}/Doc/html/index.chm" + DESTINATION "doxy" + RENAME "${OUT}" + ) + ENDIF(EXISTS "${PROJECT_BINARY_DIR}/Doc/html/index.chm") + ENDIF(NOT TARGET_DOC_SKIP_INSTALL) + + ENDIF(HTML_HELP_COMPILER) + # MESSAGE(SEND_ERROR "HTML_HELP_COMPILER=${HTML_HELP_COMPILER}") + ENDIF (WIN32) +ELSE(DOXYGEN) + MESSAGE("Doxygen not found") +ENDIF(DOXYGEN) diff --git a/attic/muse2-oom/muse2/cmake/UsePkgConfig1.cmake b/attic/muse2-oom/muse2/cmake/UsePkgConfig1.cmake new file mode 100644 index 00000000..55654d98 --- /dev/null +++ b/attic/muse2-oom/muse2/cmake/UsePkgConfig1.cmake @@ -0,0 +1,45 @@ +# - pkg-config module for CMake +# +# Defines the following macros: +# +# PKGCONFIG(package includedir libdir linkflags cflags) +# +# Calling PKGCONFIG will fill the desired information into the 4 given arguments, +# e.g. PKGCONFIG(libart-2.0 LIBART_INCLUDE_DIR LIBART_LINK_DIR LIBART_LINK_FLAGS LIBART_CFLAGS) +# if pkg-config was NOT found or the specified software package doesn't exist, the +# variable will be empty when the function returns, otherwise they will contain the respective information +# + +FIND_PROGRAM(PKGCONFIG_EXECUTABLE NAMES pkg-config PATHS /usr/bin /usr/local/bin ) + +MACRO(PKGCONFIG _package _minVersion _include_DIR _link_DIR _link_FLAGS _cflags) +# reset the variables at the beginning + SET(${_include_DIR}) + SET(${_link_DIR}) + SET(${_link_FLAGS}) + SET(${_cflags}) + + # if pkg-config has been found + IF(PKGCONFIG_EXECUTABLE) + + EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --atleast-version=${_minVersion} RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull ) +# EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --exists RETURN_VALUE _return_VALUE OUTPUT_VARIABLE _pkgconfigDevNull ) + + # and if the package of interest also exists for pkg-config, then get the information + IF(NOT _return_VALUE) + + EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --variable=includedir OUTPUT_VARIABLE ${_include_DIR} ) + + EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --variable=libdir OUTPUT_VARIABLE ${_link_DIR} ) + + EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --libs OUTPUT_VARIABLE ${_link_FLAGS} ) + + EXEC_PROGRAM(${PKGCONFIG_EXECUTABLE} ARGS ${_package} --cflags OUTPUT_VARIABLE ${_cflags} ) + + ENDIF(NOT _return_VALUE) + + ENDIF(PKGCONFIG_EXECUTABLE) + +ENDMACRO(PKGCONFIG _include_DIR _link_DIR _link_FLAGS _cflags) + +MARK_AS_ADVANCED(PKGCONFIG_EXECUTABLE) diff --git a/attic/muse2-oom/muse2/cmake/WrapMacros.cmake b/attic/muse2-oom/muse2/cmake/WrapMacros.cmake new file mode 100644 index 00000000..79b3ef7a --- /dev/null +++ b/attic/muse2-oom/muse2/cmake/WrapMacros.cmake @@ -0,0 +1,14 @@ + +MACRO(WRAP_CPP outfiles ) + FOREACH(it ${ARGN}) + SET(${outfiles} ${${outfiles}} ${it}.cpp) + ENDFOREACH(it) + ENDMACRO(WRAP_CPP) + +MACRO(WRAP_H outfiles ) + FOREACH(it ${ARGN}) + SET(${outfiles} ${${outfiles}} ${it}.h) + ENDFOREACH(it) + ENDMACRO(WRAP_H) + + diff --git a/attic/muse2-oom/muse2/cmake/cmake_uninstall.cmake.in b/attic/muse2-oom/muse2/cmake/cmake_uninstall.cmake.in new file mode 100644 index 00000000..7e6f6cc0 --- /dev/null +++ b/attic/muse2-oom/muse2/cmake/cmake_uninstall.cmake.in @@ -0,0 +1,23 @@ +IF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") + MESSAGE(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"") +ENDIF(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt") + +SET(DESTDIR $ENV{DESTDIR}) +FILE(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files) +STRING(REGEX REPLACE "\n" ";" files "${files}") +FOREACH(file ${files}) + MESSAGE(STATUS "Uninstalling \"${DESTDIR}${file}\"") + IF(EXISTS "${DESTDIR}${file}") + EXEC_PROGRAM( + "@CMAKE_COMMAND@" ARGS "-E remove \"${DESTDIR}${file}\"" + OUTPUT_VARIABLE rm_out + RETURN_VALUE rm_retval + ) + IF("${rm_retval}" STREQUAL 0) + ELSE("${rm_retval}" STREQUAL 0) + MESSAGE(FATAL_ERROR "Problem when removing \"${DESTDIR}${file}\"") + ENDIF("${rm_retval}" STREQUAL 0) + ELSE(EXISTS "${DESTDIR}${file}") + MESSAGE(STATUS "File \"${DESTDIR}${file}\" does not exist.") + ENDIF(EXISTS "${DESTDIR}${file}") +ENDFOREACH(file) |