aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBurkhard Lück <lueck@hube-lueck.de>2008-12-11 15:00:20 +0000
committerBurkhard Lück <lueck@hube-lueck.de>2008-12-11 15:00:20 +0000
commit2c5711d6bb2ca01d2e37490114e10edd6139dfe6 (patch)
tree414355b198bcff8e9916371c1baf28c39cd45d25
parente5e1e76dbf63a26379e79a77bd98173841c796b4 (diff)
downloadextra-cmake-modules-2c5711d6bb2ca01d2e37490114e10edd6139dfe6.tar.gz
extra-cmake-modules-2c5711d6bb2ca01d2e37490114e10edd6139dfe6.tar.bz2
make it possible to install several man page docbooks from one dir by generating an unique target for each docbook
improve get filename without extension to work for names with a dot in the filename like man-zonetab2pot.py.1.docbook get_filename_component( NAME_WE) cuts this to man-zonetab2pot, but it has to be man-zonetab2pot.py svn path=/trunk/KDE/kdelibs/; revision=895719
-rw-r--r--modules/KDE4Macros.cmake6
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake
index 709748de..be4620a8 100644
--- a/modules/KDE4Macros.cmake
+++ b/modules/KDE4Macros.cmake
@@ -250,7 +250,9 @@ endmacro (KDE4_CREATE_HANDBOOK)
macro (KDE4_CREATE_MANPAGE _docbook _section)
get_filename_component(_input ${_docbook} ABSOLUTE)
- get_filename_component(_base ${_input} NAME_WE)
+ get_filename_component(_base ${_input} NAME)
+
+ string(REGEX REPLACE "\\.${_section}\\.docbook$" "" _base ${_base})
set(_doc ${CMAKE_CURRENT_BINARY_DIR}/${_base}.${_section})
# sometimes we have "man-" prepended
@@ -270,7 +272,7 @@ macro (KDE4_CREATE_MANPAGE _docbook _section)
DEPENDS ${_input} ${_KDE4_MEINPROC_EXECUTABLE_DEP} ${_ssheet}
)
get_filename_component(_targ ${CMAKE_CURRENT_SOURCE_DIR} NAME)
- set(_targ "${_targ}-manpage")
+ set(_targ "${_targ}-manpage-${_base}")
add_custom_target(${_targ} ALL DEPENDS "${_outdoc}")
set(_args ${ARGN})