diff options
author | Laurent Montel <montel@kde.org> | 2007-01-22 15:39:34 +0000 |
---|---|---|
committer | Laurent Montel <montel@kde.org> | 2007-01-22 15:39:34 +0000 |
commit | af2b8b438d0ae57f744c1b49a92237b8a5ddc4cd (patch) | |
tree | c59121a16266ec9f7151d9182e74c32f56537cd8 | |
parent | 6c92b70dac6b5cbd6acee53d9539df0b4c93033b (diff) | |
download | extra-cmake-modules-af2b8b438d0ae57f744c1b49a92237b8a5ddc4cd.tar.gz extra-cmake-modules-af2b8b438d0ae57f744c1b49a92237b8a5ddc4cd.tar.bz2 |
Fix create symlink when in post install
svn path=/trunk/KDE/kdelibs/; revision=626238
-rw-r--r-- | modules/KDE4Macros.cmake | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/modules/KDE4Macros.cmake b/modules/KDE4Macros.cmake index 182437b5..ddedb91f 100644 --- a/modules/KDE4Macros.cmake +++ b/modules/KDE4Macros.cmake @@ -235,13 +235,10 @@ macro (KDE4_INSTALL_HANDBOOK) install(FILES ${CMAKE_CURRENT_BINARY_DIR}/index.cache.bz2 ${_books} ${_images} DESTINATION ${HTML_INSTALL_DIR}/en/${dirname}) # TODO symlinks on non-unix platforms if (UNIX) - install(DIRECTORY /var/lib/empty/ DESTINATION ${HTML_INSTALL_DIR}/en/${dirname}) - ADD_CUSTOM_COMMAND(OUTPUT "${HTML_INSTALL_DIR}/en/${dirname}/common" - DEPENDS "${HTML_INSTALL_DIR}/en/common" - COMMAND /bin/ln - ARGS -s "${HTML_INSTALL_DIR}/en/common" "${HTML_INSTALL_DIR}/en/${dirname}/common" - COMMENT "Symlink") - ADD_CUSTOM_TARGET(CreateSymlinks ALL DEPENDS ${HTML_INSTALL_DIR}/en/${dirname}/common) + # write a cmake script file which creates the symlink + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/make_doc_symlink.cmake "exec_program(${CMAKE_COMMAND} ARGS -E create_symlink ${HTML_INSTALL_DIR}/en/common ${HTML_INSTALL_DIR}/en/${dirname}/common )\n") + # and add it as post-install script to any of the installed targets, so it will be executed during "make install" + ADD_CUSTOM_TARGET(CreateSymlinks POST_INSTALL_SCRIPT ALL DEPENDS ${HTML_INSTALL_DIR}/en/${dirname}/common) endif (UNIX) endmacro (KDE4_INSTALL_HANDBOOK ) |